ENH: refresh nozzle info from studio

Jira: [STUDIO-13650]
Change-Id: I12dc26d5730c761ccc91d3a4a5f120d422d8a0ff
(cherry picked from commit 2bd7cd9a6a4d9c3370491fb4323a1aabe9a45578)
This commit is contained in:
hemai
2025-07-31 16:00:47 +08:00
committed by Noisyfox
parent 7df679fba7
commit a397a7378a
8 changed files with 177 additions and 14 deletions

View File

@@ -1491,6 +1491,14 @@ int MachineObject::command_set_nozzle_new(int nozzle_id, int temp)
return this->publish_json(j, 1);
}
int MachineObject::command_refresh_nozzle(){
json j;
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
j["print"]["command"] = "refresh_nozzle";
return this->publish_json(j, 1);
}
int MachineObject::command_set_chamber(int temp)
{
json j;
@@ -2914,6 +2922,12 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_
bed_temperature_limit = jj["bed_temperature_limit"].get<int>();
}
}
if (jj.contains("support_refresh_nozzle")) {
if (jj["support_refresh_nozzle"].is_boolean()) {
is_support_refresh_nozzle = jj["support_refresh_nozzle"].get<bool>();
}
}
}