mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-02 02:31:38 +02:00
0.5.110
* MQTT fix reconnection by new lib version #780 * display 'failed' if no Update was selected #813
This commit is contained in:
parent
a1aedce59e
commit
fae46c4667
4 changed files with 10 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue