OTA remote - add error string

This commit is contained in:
2023-11-28 12:04:19 +05:30
parent e375daad36
commit 40bedd29fb
4 changed files with 14 additions and 13 deletions
Binary file not shown.
+3 -3
View File
@@ -1,9 +1,9 @@
#ifndef BUILD_NUMBER #ifndef BUILD_NUMBER
#define BUILD_NUMBER 4 #define BUILD_NUMBER 9
#endif #endif
#ifndef VERSION #ifndef VERSION
#define VERSION "v0.1.4 - 2023-11-28 11:53:00.628775" #define VERSION "v0.1.9 - 2023-11-28 12:03:55.553853"
#endif #endif
#ifndef VERSION_SHORT #ifndef VERSION_SHORT
#define VERSION_SHORT "v0.1.4" #define VERSION_SHORT "v0.1.9"
#endif #endif
+10 -9
View File
@@ -52,14 +52,15 @@ void handleOTARemote() {
client.setFingerprint(fingerprint); client.setFingerprint(fingerprint);
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "https://github.com/bendtherules/Patient-counter-esp8266/raw/main/.pio/build/esp12e/firmware.bin", VERSION_SHORT); t_httpUpdate_return ret = ESPhttpUpdate.update(client, "https://github.com/bendtherules/Patient-counter-esp8266/raw/main/.pio/build/esp12e/firmware.bin", VERSION_SHORT);
switch(ret) { switch(ret) {
case HTTP_UPDATE_FAILED: case HTTP_UPDATE_FAILED:
Serial.println("[update] Update failed."); Serial.println("[update] Update failed.");
break; break;
case HTTP_UPDATE_NO_UPDATES: case HTTP_UPDATE_NO_UPDATES:
Serial.println("[update] Update no Update."); Serial.print("[update] Update no Update. Reason -");
break; Serial.println(ESPhttpUpdate.getLastErrorString());
case HTTP_UPDATE_OK: break;
Serial.println("[update] Update ok."); // may not be called since we reboot the ESP case HTTP_UPDATE_OK:
break; Serial.println("[update] Update ok."); // may not be called since we reboot the ESP
break;
} }
} }
+1 -1
View File
@@ -1 +1 @@
4 9