diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index e8fc6185b..2fcd9d39c 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -4492,6 +4492,12 @@ int MachineObject::parse_json(std::string payload, bool key_field_only) } } } else if (jj["command"].get() == "extrusion_cali_set") { + if (jj.contains("result") && jj.contains("reason")) { + if (jj["result"].get() == "fail") { + auto err_code = jj["err_code"].get(); + print_error = err_code; + } + } #ifdef CALI_DEBUG std::string str = jj.dump(); BOOST_LOG_TRIVIAL(info) << "extrusion_cali_set: " << str; @@ -4536,6 +4542,13 @@ int MachineObject::parse_json(std::string payload, bool key_field_only) extrusion_cali_set_hold_start = std::chrono::system_clock::now(); } else if (jj["command"].get() == "extrusion_cali_sel") { + if (jj.contains("result") && jj.contains("reason")) { + if (jj["result"].get() == "fail") { + auto err_code = jj["err_code"].get(); + print_error = err_code; + } + } + #ifdef CALI_DEBUG std::string str = jj.dump(); BOOST_LOG_TRIVIAL(info) << "extrusion_cali_sel: " << str; @@ -4577,6 +4590,13 @@ int MachineObject::parse_json(std::string payload, bool key_field_only) } } else if (jj["command"].get() == "extrusion_cali_get") { + if (jj.contains("result") && jj.contains("reason")) { + if (jj["result"].get() == "fail") { + auto err_code = jj["err_code"].get(); + print_error = err_code; + } + } + reset_pa_cali_history_result(); has_get_pa_calib_tab = true; @@ -4640,6 +4660,13 @@ int MachineObject::parse_json(std::string payload, bool key_field_only) // notify cali history to update } else if (jj["command"].get() == "extrusion_cali_get_result") { + if (jj.contains("result") && jj.contains("reason")) { + if (jj["result"].get() == "fail") { + auto err_code = jj["err_code"].get(); + print_error = err_code; + } + } + reset_pa_cali_result(); get_pa_calib_result = true;