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:
Stone Li 2022-12-09 21:03:00 +08:00 committed by Lane.Wei
parent ab5f2aa3f7
commit 250a359247
2 changed files with 11 additions and 0 deletions

View File

@ -2204,6 +2204,15 @@ int MachineObject::parse_json(std::string payload)
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 (...) {
;

View File

@ -460,6 +460,8 @@ public:
/*online*/
bool online_rfid;
bool online_ahb;
int online_version = -1;
int last_online_version = -1;
/* temperature */
float nozzle_temp;