mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-23 19:26:38 +00:00
HTTP update logging improvements
This commit is contained in:
parent
6c7ec102cd
commit
61a0c8b896
@ -690,6 +690,8 @@ static inline void webUpdatePrintError()
|
|||||||
#elif defined(ARDUINO_ARCH_ESP32)
|
#elif defined(ARDUINO_ARCH_ESP32)
|
||||||
LOG_ERROR(TAG_HTTP, Update.errorString()); // ESP32 has errorString()
|
LOG_ERROR(TAG_HTTP, Update.errorString()); // ESP32 has errorString()
|
||||||
haspProgressMsg(Update.errorString());
|
haspProgressMsg(Update.errorString());
|
||||||
|
Update.abort();
|
||||||
|
Update.end(false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -750,10 +752,12 @@ static void webHandleFirmwareUpload()
|
|||||||
}
|
}
|
||||||
|
|
||||||
case UPLOAD_FILE_WRITE: // flashing firmware to ESP
|
case UPLOAD_FILE_WRITE: // flashing firmware to ESP
|
||||||
if(Update.write(upload->buf, upload->currentSize) != upload->currentSize) {
|
if(!Update.isFinished()) {
|
||||||
webUpdatePrintError();
|
if(Update.write(upload->buf, upload->currentSize) != upload->currentSize) {
|
||||||
} else {
|
webUpdatePrintError();
|
||||||
webUploadProgress();
|
} else {
|
||||||
|
webUploadProgress();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user