mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 22:52:19 +03:00
process to asinc
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "Upgrade.h"
|
||||
|
||||
#include "Class/NotAsinc.h"
|
||||
#include "Global.h"
|
||||
#include "ESP8266.h"
|
||||
|
||||
@@ -27,7 +27,14 @@ void getLastVersion() {
|
||||
}
|
||||
}
|
||||
|
||||
void initUpdater() {
|
||||
void upgradeInit() {
|
||||
|
||||
myNotAsincActions->add(
|
||||
do_UPGRADE, [&](void*) {
|
||||
upgrade_firmware();
|
||||
},
|
||||
nullptr);
|
||||
|
||||
if (isNetworkActive()) {
|
||||
getLastVersion();
|
||||
if (lastVersion.length()) {
|
||||
@@ -78,10 +85,3 @@ void upgrade_firmware() {
|
||||
pm.error("on firmware");
|
||||
}
|
||||
}
|
||||
|
||||
void do_update() {
|
||||
if (updateFlag) {
|
||||
updateFlag = false;
|
||||
upgrade_firmware();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user