mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
FIX:use the gcode line command to unload the C11 printer
Change-Id: I33eec56b8c02fd605d3c0acb4e1f9d07811cea69
This commit is contained in:
parent
a94b78d296
commit
33c22bef62
1 changed files with 16 additions and 0 deletions
|
@ -1816,6 +1816,22 @@ int MachineObject::command_unload_filament()
|
|||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
return this->publish_json(j.dump());
|
||||
}
|
||||
else if (printer_type == "C11") {
|
||||
std::string gcode = DeviceManager::load_gcode(printer_type, "ams_unload.gcode");
|
||||
if (gcode.empty()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
json j;
|
||||
j["print"]["command"] = "gcode_line";
|
||||
j["print"]["param"] = gcode;
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
|
||||
if (m_agent)
|
||||
j["print"]["user_id"] = m_agent->get_user_id();
|
||||
|
||||
return this->publish_json(j.dump());
|
||||
}
|
||||
else {
|
||||
json j;
|
||||
j["print"]["command"] = "unload_filament";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue