ENH:support setting nozzle data

jira:[none]

Change-Id: I75044d9b5529286e5c32a436a38d2e3c8fcf4d55
(cherry picked from commit 68b314eebd58c486cda79931c52a9bdcb72556a3)
This commit is contained in:
tao wang 2024-12-09 20:12:24 +08:00 committed by Noisyfox
parent 1f9d27d880
commit 0e5d3fd7b8
4 changed files with 40 additions and 25 deletions

View file

@ -2106,7 +2106,7 @@ int MachineObject::command_set_printer_nozzle(std::string nozzle_type, float dia
return this->publish_json(j.dump());
}
int MachineObject::command_set_printer_nozzle2(int id, std::string nozzle_type, float diameter, int flow)
int MachineObject::command_set_printer_nozzle2(int id, std::string nozzle_type, float diameter)
{
nozzle_setting_hold_count = HOLD_COUNT_MAX * 2;
BOOST_LOG_TRIVIAL(info) << "command_set_printer_nozzle2, nozzle_type = " << nozzle_type << " diameter = " << diameter;
@ -2114,8 +2114,9 @@ int MachineObject::command_set_printer_nozzle2(int id, std::string nozzle_type,
j["print"]["command"] = "set_nozzle";
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
j["print"]["id"] = id;
j["print"]["type"] = "type";
j["print"]["type"] = nozzle_type;
j["print"]["diameter"] = diameter;
j["print"]["wear"] = 0;
return this->publish_json(j.dump());
}