mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
NEW:support multiple extruder new control
jira:[device page] Change-Id: Idf68a3385172cbaa123cedb4e2b814c15cc09f07 (cherry picked from commit 7700b911a6fec782ce6b484b9b030963283a846c)
This commit is contained in:
@@ -1644,6 +1644,20 @@ bool MachineObject::is_studio_cmd(int sequence_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
int MachineObject::command_select_extruder(int id)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "select_extruder";
|
||||
|
||||
nozzle_selected_count = HOLD_COUNT_MAX;
|
||||
|
||||
json j;
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
j["print"]["command"] = "select_extruder";
|
||||
j["print"]["extruder_index"] = id;
|
||||
|
||||
return this->publish_json(j.dump(), 1);
|
||||
}
|
||||
|
||||
int MachineObject::command_get_version(bool with_retry)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "command_get_version";
|
||||
@@ -1901,6 +1915,21 @@ int MachineObject::command_set_nozzle(int temp)
|
||||
return this->publish_gcode(gcode_str);
|
||||
}
|
||||
|
||||
int MachineObject::command_set_nozzle_new(int nozzle_id, int temp)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "set_nozzle_temp";
|
||||
|
||||
nozzle_selected_count = HOLD_COUNT_MAX;
|
||||
|
||||
json j;
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
j["print"]["command"] = "set_nozzle_temp";
|
||||
j["print"]["extruder_index"] = nozzle_id;
|
||||
j["print"]["target_temp"] = temp;
|
||||
|
||||
return this->publish_json(j.dump(), 1);
|
||||
}
|
||||
|
||||
int MachineObject::command_set_chamber(int temp)
|
||||
{
|
||||
json j;
|
||||
@@ -3290,6 +3319,7 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (jj.contains("command")) {
|
||||
if (jj["command"].get<std::string>() == "ams_change_filament") {
|
||||
if (jj.contains("errno")) {
|
||||
|
||||
Reference in New Issue
Block a user