mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: add hms action buttons
jira: [STUDIO-10823] Change-Id: I751f0951df439a5265cc53f5679fa69b8d1c728a (cherry picked from commit 0ed457207e2ec31cca276667af9c4ffa392f9843)
This commit is contained in:
@@ -2018,6 +2018,50 @@ int MachineObject::command_task_resume()
|
||||
return this->publish_json(j.dump(), 1);
|
||||
}
|
||||
|
||||
int MachineObject::command_hms_idle_ignore(const std::string &error_str, int type)
|
||||
{
|
||||
json j;
|
||||
j["print"]["command"] = "idle_ignore";
|
||||
j["print"]["err"] = error_str;
|
||||
j["print"]["type"] = type;
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
return this->publish_json(j.dump(), 1);
|
||||
}
|
||||
|
||||
int MachineObject::command_hms_resume(const std::string& error_str, const std::string& job_id)
|
||||
{
|
||||
json j;
|
||||
j["print"]["command"] = "resume";
|
||||
j["print"]["err"] = error_str;
|
||||
j["print"]["param"] = "reserve";
|
||||
j["print"]["job_id"] = job_id;
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
|
||||
return this->publish_json(j.dump(), 1);
|
||||
}
|
||||
|
||||
int MachineObject::command_hms_ignore(const std::string& error_str, const std::string& job_id)
|
||||
{
|
||||
json j;
|
||||
j["print"]["command"] = "ignore";
|
||||
j["print"]["err"] = error_str;
|
||||
j["print"]["param"] = "reserve";
|
||||
j["print"]["job_id"] = job_id;
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
|
||||
return this->publish_json(j.dump(), 1);
|
||||
}
|
||||
|
||||
int MachineObject::command_stop_buzzer()
|
||||
{
|
||||
json j;
|
||||
j["print"]["command"] = "buzzer_ctrl";
|
||||
j["print"]["mode"] = 0;
|
||||
j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
|
||||
return this->publish_json(j.dump(), 1);
|
||||
}
|
||||
|
||||
int MachineObject::command_set_bed(int temp)
|
||||
{
|
||||
std::string gcode_str = (boost::format("M140 S%1%\n") % temp).str();
|
||||
|
||||
Reference in New Issue
Block a user