mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
FIX: Skip the command result of other platform
JIRA: [STUDIO-13607] Change-Id: Icfb87214278baccb4b97582ba46e4e439ffcdc02 (cherry picked from commit 09dfade232459f5663bebcadc39c90c3f132e6cf)
This commit is contained in:
@@ -2891,7 +2891,7 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_
|
|||||||
|
|
||||||
if (!key_field_only)
|
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<int>());}
|
if (jj["err_code"].is_number()) { add_command_error_code_dlg(jj["err_code"].get<int>());}
|
||||||
}
|
}
|
||||||
@@ -4114,7 +4114,17 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_
|
|||||||
BOOST_LOG_TRIVIAL(info) << "ack of upgrade_confirm";
|
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<std::string>();
|
||||||
|
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()) {
|
if (j["upgrade"]["err_code"].is_number()) {
|
||||||
add_command_error_code_dlg(j["upgrade"]["err_code"].get<int>());
|
add_command_error_code_dlg(j["upgrade"]["err_code"].get<int>());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user