ENH: add wiki for replacing nozzle

jira: [STUDIO-12864]
Change-Id: I3804d3599eb8746902f23b59626fe8c04e949dca
(cherry picked from commit b9428cd32ff8c1c748377cab1e5539fed911177d)
This commit is contained in:
xin.zhang
2025-06-23 15:06:26 +08:00
committed by Noisyfox
parent 8dc43f1b67
commit 8f943486a1
13 changed files with 116 additions and 3 deletions

View File

@@ -6885,6 +6885,23 @@ void MachineObject::command_set_save_remote_print_file_to_storage(bool save)
}
}
wxString MachineObject::get_nozzle_replace_url() const
{
const wxString& strLanguage = GUI::wxGetApp().app_config->get("language");
const wxString& lan_code = strLanguage.BeforeFirst('_');
const json& link_map = DeviceManager::get_json_from_config(printer_type, "print", "nozzle_replace_wiki");
if (link_map.contains(lan_code.ToStdString())) {
return link_map[lan_code.ToStdString()].get<wxString>();
}
if (link_map.contains("en")){
return link_map["en"].get<wxString>();
}/*retry with en*/
return "https://wiki.bambulab.com/en/h2/maintenance/replace-hotend";
}
bool DeviceManager::EnableMultiMachine = false;
bool DeviceManager::key_field_only = false;