* MQTT fix reconnection by new lib version #780
* display 'failed' if no Update was selected #813
This commit is contained in:
lumapu 2023-03-27 21:27:49 +02:00
parent a1aedce59e
commit fae46c4667
4 changed files with 10 additions and 8 deletions

View file

@ -141,16 +141,14 @@ class Web {
}
}
if (!Update.hasError()) {
if (Update.write(data, len) != len) {
if (Update.write(data, len) != len)
Update.printError(Serial);
}
}
if (final) {
if (Update.end(true)) {
if (Update.end(true))
Serial.printf("Update Success: %uB\n", index + len);
} else {
else
Update.printError(Serial);
}
}
}
@ -245,7 +243,7 @@ class Web {
}
void showUpdate(AsyncWebServerRequest *request) {
bool reboot = !Update.hasError();
bool reboot = (!Update.hasError() && Update.size() > 0);
String html = F("<!doctype html><html><head><title>Update</title><meta http-equiv=\"refresh\" content=\"20; URL=/\"></head><body>Update: ");
if (reboot)