mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-28 18:30:33 -07:00
FIX: update is_info_ready function
jira: [STUDIO-10608] Change-Id: I068969223e54b1fa2056a0acc80bef87d167942c (cherry picked from commit 44e068e705742b37513d2ce65c18a41007d4b7d8)
This commit is contained in:
parent
95d7da6972
commit
581af2c433
3 changed files with 5 additions and 1 deletions
|
|
@ -2854,6 +2854,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;
|
||||
|
|
@ -2956,7 +2957,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;
|
||||
|
|
@ -3094,6 +3095,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);
|
||||
|
|
|
|||
|
|
@ -894,6 +894,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);
|
||||
|
|
|
|||
|
|
@ -633,6 +633,7 @@ void AMSControl::CreateAmsDoubleNozzle()
|
|||
}
|
||||
if (m_ext_info.size() <= 1) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "vt_slot empty!";
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
AMSinfo ext_info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue