mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: refresh nozzle info from studio
Jira: [STUDIO-13650] Change-Id: I12dc26d5730c761ccc91d3a4a5f120d422d8a0ff (cherry picked from commit 2bd7cd9a6a4d9c3370491fb4323a1aabe9a45578)
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user