ota.cpp small fixes
This commit is contained in:
parent
7ff537bb34
commit
c061f3f586
@ -84,16 +84,14 @@ void start_ota_update() {
|
|||||||
ESP_LOGI(TAG, "Connected to %s", WIFI_SSID);
|
ESP_LOGI(TAG, "Connected to %s", WIFI_SSID);
|
||||||
display(1, "OK", "WiFi connected");
|
display(1, "OK", "WiFi connected");
|
||||||
// do a number of tries to update firmware limited by OTA_MAX_TRY
|
// do a number of tries to update firmware limited by OTA_MAX_TRY
|
||||||
while (j--) {
|
while ((j--) && (!ret)) {
|
||||||
ESP_LOGI(TAG,
|
ESP_LOGI(TAG,
|
||||||
"Starting OTA update, attempt %u of %u. This will take some "
|
"Starting OTA update, attempt %u of %u. This will take some "
|
||||||
"time to complete...",
|
"time to complete...",
|
||||||
OTA_MAX_TRY - j, OTA_MAX_TRY);
|
OTA_MAX_TRY - j, OTA_MAX_TRY);
|
||||||
ret = do_ota_update();
|
ret = do_ota_update();
|
||||||
if (ret)
|
}
|
||||||
goto end; // update successful
|
goto end;
|
||||||
} // update not successful
|
|
||||||
goto end;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user