FIX: update is_info_ready function
jira: [STUDIO-10608] Change-Id: I068969223e54b1fa2056a0acc80bef87d167942c
This commit is contained in:
parent
27bb14eb22
commit
44e068e705
|
@ -2924,6 +2924,7 @@ void MachineObject::reset()
|
|||
BOOST_LOG_TRIVIAL(trace) << "reset dev_id=" << dev_id;
|
||||
last_update_time = std::chrono::system_clock::now();
|
||||
m_push_count = 0;
|
||||
m_full_msg_count = 0;
|
||||
is_220V_voltage = false;
|
||||
get_version_retry = 0;
|
||||
camera_recording = false;
|
||||
|
@ -3028,7 +3029,7 @@ bool MachineObject::is_info_ready(bool check_version) const
|
|||
|
||||
std::chrono::system_clock::time_point curr_time = std::chrono::system_clock::now();
|
||||
auto diff = std::chrono::duration_cast<std::chrono::microseconds>(last_push_time - curr_time);
|
||||
if (m_push_count > 0 && diff.count() < PUSHINFO_TIMEOUT) {
|
||||
if (m_full_msg_count > 0 && m_push_count > 0 && diff.count() < PUSHINFO_TIMEOUT) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -3152,6 +3153,7 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
|||
if (j_pre["print"]["msg"].get<int>() == 0) { //all message
|
||||
BOOST_LOG_TRIVIAL(trace) << "static: get push_all msg, dev_id=" << dev_id;
|
||||
m_push_count++;
|
||||
m_full_msg_count++;
|
||||
if (!printer_type.empty())
|
||||
print_json.load_compatible_settings(printer_type, "");
|
||||
print_json.diff2all_base_reset(j_pre);
|
||||
|
|
|
@ -891,6 +891,7 @@ public:
|
|||
std::vector<int> stage_list_info;
|
||||
int stage_curr = 0;
|
||||
int m_push_count = 0;
|
||||
int m_full_msg_count = 0; /*the full message count, there are full or diff messages from network*/
|
||||
bool calibration_done { false };
|
||||
|
||||
bool is_axis_at_home(std::string axis);
|
||||
|
|
|
@ -3030,6 +3030,7 @@ void AMSControl::CreateAmsDoubleNozzle()
|
|||
}
|
||||
if (m_ext_info.size() <= 1) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "vt_slot empty!";
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
AMSinfo ext_info;
|
||||
|
|
Loading…
Reference in New Issue