ENH: support command error dialog; support clean print error; support stop ams drying

JIRA: [STUDIO-12441] [STUDIO-13123] [STUDIO-12372]
Change-Id: I87170f1f51c1e24f6eee61deb07d06ff6b53a884
(cherry picked from commit 1ec5382f14ebf06d8f3ed128e377243665434ca6)
This commit is contained in:
xin.zhang
2025-07-03 15:20:57 +08:00
committed by Noisyfox
parent 0721078177
commit a5c6450cc5
12 changed files with 603 additions and 5 deletions

View File

@@ -7,6 +7,7 @@
#include <string>
#include <memory>
#include <chrono>
#include <unordered_set>
#include <boost/thread.hpp>
#include <boost/nowide/fstream.hpp>
#include "nlohmann/json.hpp"
@@ -74,6 +75,10 @@ using namespace nlohmann;
namespace Slic3r {
namespace GUI {
class DeviceErrorDialog; // Previous definitions
}
struct BBLocalMachine;
class SecondaryCheckDialog;
enum PrinterArch {
@@ -919,6 +924,12 @@ public:
int hw_switch_state;
bool is_system_printing();
int print_error;
static std::string get_error_code_str(int error_code);
std::string get_print_error_str() const { return MachineObject::get_error_code_str(this->print_error); }
std::unordered_set<GUI::DeviceErrorDialog*> m_command_error_code_dlgs;
void add_command_error_code_dlg(int command_err);
int curr_layer = 0;
int total_layers = 0;
bool is_support_layer_num { false };
@@ -1221,6 +1232,7 @@ public:
int command_request_push_all(bool request_now = false);
int command_pushing(std::string cmd);
int command_clean_print_error(std::string task_id, int print_error);
int command_clean_print_error_uiop(int print_error);
int command_set_printer_nozzle(std::string nozzle_type, float diameter);
int command_set_printer_nozzle2(int id, std::string nozzle_type, float diameter);
int command_get_access_code();
@@ -1272,6 +1284,9 @@ public:
int command_ams_refresh_rfid(std::string tray_id);
int command_ams_refresh_rfid2(int ams_id, int slot_id);
int command_ams_control(std::string action);
int command_ams_drying_stop();
int command_set_chamber_light(LIGHT_EFFECT effect, int on_time = 500, int off_time = 500, int loops = 1, int interval = 1000);
int command_set_chamber_light2(LIGHT_EFFECT effect, int on_time = 500, int off_time = 500, int loops = 1, int interval = 1000);
int command_set_work_light(LIGHT_EFFECT effect, int on_time = 500, int off_time = 500, int loops = 1, int interval = 1000);