From d1d7e87f8690f0b77b141f540466bf88f9cc0d19 Mon Sep 17 00:00:00 2001 From: "xin.zhang" Date: Wed, 23 Jul 2025 15:39:21 +0800 Subject: [PATCH] FIX: Skip the command result of other platform JIRA: [STUDIO-13607] Change-Id: Icfb87214278baccb4b97582ba46e4e439ffcdc02 (cherry picked from commit 09dfade232459f5663bebcadc39c90c3f132e6cf) --- src/slic3r/GUI/DeviceManager.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 202d4eb161..b5d1cfba67 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -2891,7 +2891,7 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_ if (!key_field_only) { - if (jj.contains("command") && jj.contains("err_code") && jj.contains("result")) + if (is_studio_cmd(sequence_id) && jj.contains("command") && jj.contains("err_code") && jj.contains("result")) { if (jj["err_code"].is_number()) { add_command_error_code_dlg(jj["err_code"].get());} } @@ -4114,7 +4114,17 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_ BOOST_LOG_TRIVIAL(info) << "ack of upgrade_confirm"; } - if (j["upgrade"].contains("err_code")) { + bool check_studio_cmd = true; + if (j["upgrade"].contains("sequence_id")) { + try + { + std::string str_seq = j["upgrade"]["sequence_id"].get(); + check_studio_cmd = is_studio_cmd(stoi(str_seq)); + } + catch (...) { } + } + + if (check_studio_cmd && j["upgrade"].contains("err_code")) { if (j["upgrade"]["err_code"].is_number()) { add_command_error_code_dlg(j["upgrade"]["err_code"].get()); }