NEW: request get version when online version is diff
Change-Id: If096fc6b050da80d4f961660a42a88deb4fe9f7e Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
ab5f2aa3f7
commit
250a359247
|
@ -2204,6 +2204,15 @@ int MachineObject::parse_json(std::string payload)
|
||||||
online_rfid = false;
|
online_rfid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (jj["online"].contains("version")) {
|
||||||
|
online_version = jj["online"]["version"].get<int>();
|
||||||
|
}
|
||||||
|
if (last_online_version != online_version) {
|
||||||
|
last_online_version = online_version;
|
||||||
|
GUI::wxGetApp().CallAfter([this] {
|
||||||
|
this->command_get_version();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
;
|
;
|
||||||
|
|
|
@ -460,6 +460,8 @@ public:
|
||||||
/*online*/
|
/*online*/
|
||||||
bool online_rfid;
|
bool online_rfid;
|
||||||
bool online_ahb;
|
bool online_ahb;
|
||||||
|
int online_version = -1;
|
||||||
|
int last_online_version = -1;
|
||||||
|
|
||||||
/* temperature */
|
/* temperature */
|
||||||
float nozzle_temp;
|
float nozzle_temp;
|
||||||
|
|
Loading…
Reference in New Issue