Version bumps, OTA working
All checks were successful
Test compiling project / test (push) Successful in 2m23s
All checks were successful
Test compiling project / test (push) Successful in 2m23s
This commit is contained in:
@@ -8,6 +8,6 @@
|
||||
#define water_level_max_key "water_level_max"
|
||||
#define water_volume_key "water_volume"
|
||||
#define current_software_version Version{0, 0, 16}
|
||||
#define REQUIRED_SPIFFS_VERSION Version{3, 0, 0}
|
||||
#define REQUIRED_SPIFFS_VERSION Version{4, 0, 0}
|
||||
|
||||
#define RESISTOR_VALUE 4
|
||||
@@ -54,12 +54,14 @@ void update_started() {
|
||||
void update_finished() {
|
||||
Log.verbose("OTA Update finished");
|
||||
ota_status.update_progress = -1;
|
||||
ws.textAll(String(-1).c_str());
|
||||
}
|
||||
|
||||
void update_progress(int cur, int total) {
|
||||
ota_status.update_progress = 0;
|
||||
if (cur != 0 ) {
|
||||
ota_status.update_progress = total/cur;
|
||||
ota_status.update_progress = int(float(cur)/float(total)*100);
|
||||
Log.verbose("OTA Update progress: %d/%d, %i", cur, total, ota_status.update_progress);
|
||||
}
|
||||
ws.textAll(String(ota_status.update_progress).c_str());
|
||||
Log.verbose("OTA Update progress: %d/%d", cur, total);
|
||||
|
||||
Reference in New Issue
Block a user