FIX: add ack info for cali command
jira: none Change-Id: Iec36ba2fd1248428234d74adb2089d975c54b7f2 (cherry picked from commit 0312db40c8ee5dfe7a912bf9992240f99036f6a8) (cherry picked from commit 8a279ef30238dc70ef9b4ef473e75b4335059b87)
This commit is contained in:
parent
f16038190d
commit
fde250fbe3
1 changed files with 27 additions and 0 deletions
|
@ -4492,6 +4492,12 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
|||
}
|
||||
}
|
||||
} else if (jj["command"].get<std::string>() == "extrusion_cali_set") {
|
||||
if (jj.contains("result") && jj.contains("reason")) {
|
||||
if (jj["result"].get<std::string>() == "fail") {
|
||||
auto err_code = jj["err_code"].get<int>();
|
||||
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<std::string>() == "extrusion_cali_sel") {
|
||||
if (jj.contains("result") && jj.contains("reason")) {
|
||||
if (jj["result"].get<std::string>() == "fail") {
|
||||
auto err_code = jj["err_code"].get<int>();
|
||||
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<std::string>() == "extrusion_cali_get") {
|
||||
if (jj.contains("result") && jj.contains("reason")) {
|
||||
if (jj["result"].get<std::string>() == "fail") {
|
||||
auto err_code = jj["err_code"].get<int>();
|
||||
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<std::string>() == "extrusion_cali_get_result") {
|
||||
if (jj.contains("result") && jj.contains("reason")) {
|
||||
if (jj["result"].get<std::string>() == "fail") {
|
||||
auto err_code = jj["err_code"].get<int>();
|
||||
print_error = err_code;
|
||||
}
|
||||
}
|
||||
|
||||
reset_pa_cali_result();
|
||||
get_pa_calib_result = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue