add air firmware upgrade support

This commit is contained in:
Dmitry Borisenko
2020-03-04 00:27:35 +03:00
parent a6117db46e
commit f8a50e09b7
5 changed files with 161 additions and 61 deletions

View File

@@ -25,6 +25,8 @@ void setup() {
Serial.setDebugOutput(0);
#endif
jsonWrite(configSetup, "firmware_version", firmware_version);
prex = prefix + "/" + chipID;
Serial.println(chipID);
//--------------------------------------------------------------
@@ -58,10 +60,11 @@ void setup() {
getMemoryLoad("[i] After loading");
// ts.add(TEST, 20000, [&](void*) {
ts.add(TEST, 14400, [&](void*) {
// }, nullptr, true);
statistics();
}, nullptr, false);
}
void loop() {
@@ -81,4 +84,5 @@ void loop() {
handleScenario();
ts.update();
handle_upgrade();
}