mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Add more error messages in firmware download
This commit is contained in:
parent
7a0ff2dffb
commit
b86bbdaa4a
2 changed files with 10 additions and 3 deletions
11
GitOTA.cpp
11
GitOTA.cpp
|
|
@ -444,6 +444,7 @@ int8_t GitUpdater::downloadFile() {
|
|||
delay(1);
|
||||
if(total >= len) {
|
||||
if(!Update.end()) {
|
||||
Serial.println("Error downloading update...");
|
||||
Update.printError(Serial);
|
||||
}
|
||||
else {
|
||||
|
|
@ -453,9 +454,15 @@ int8_t GitUpdater::downloadFile() {
|
|||
}
|
||||
}
|
||||
}
|
||||
Serial.printf("Update %s complete\n", this->currentFile);
|
||||
|
||||
free(buff);
|
||||
if(len < total) {
|
||||
Serial.println("Error downloading file");
|
||||
return -42;
|
||||
|
||||
}
|
||||
else
|
||||
Serial.printf("Update %s complete\n", this->currentFile);
|
||||
|
||||
}
|
||||
else {
|
||||
// TODO: memory allocation error.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue