Browse Source

0.5.110

* MQTT fix reconnection by new lib version #780
* display 'failed' if no Update was selected #813
pull/618/head
lumapu 2 years ago
parent
commit
fae46c4667
  1. 4
      src/CHANGES.md
  2. 2
      src/defines.h
  3. 2
      src/platformio.ini
  4. 10
      src/web/web.h

4
src/CHANGES.md

@ -2,6 +2,10 @@
(starting from release version `0.5.66`) (starting from release version `0.5.66`)
## 0.5.110
* MQTT fix reconnection by new lib version #780
* display 'failed' if no Update was selected #813
## 0.5.109 ## 0.5.109
* reduced heap fragmentation by optimizing MqTT #768 * reduced heap fragmentation by optimizing MqTT #768
* ePaper: centered text thx @knickohr * ePaper: centered text thx @knickohr

2
src/defines.h

@ -13,7 +13,7 @@
//------------------------------------- //-------------------------------------
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 5 #define VERSION_MINOR 5
#define VERSION_PATCH 109 #define VERSION_PATCH 110
//------------------------------------- //-------------------------------------
typedef struct { typedef struct {

2
src/platformio.ini

@ -37,7 +37,7 @@ lib_deps =
https://github.com/yubox-node-org/ESPAsyncWebServer https://github.com/yubox-node-org/ESPAsyncWebServer
nrf24/RF24 @ ^1.4.5 nrf24/RF24 @ ^1.4.5
paulstoffregen/Time @ ^1.6.1 paulstoffregen/Time @ ^1.6.1
https://github.com/bertmelis/espMqttClient#v1.4.1 https://github.com/bertmelis/espMqttClient#v1.4.2
bblanchon/ArduinoJson @ ^6.21.0 bblanchon/ArduinoJson @ ^6.21.0
https://github.com/JChristensen/Timezone @ ^1.2.4 https://github.com/JChristensen/Timezone @ ^1.2.4
olikraus/U8g2 @ ^2.34.16 olikraus/U8g2 @ ^2.34.16

10
src/web/web.h

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

Loading…
Cancel
Save