mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +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
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
|
|
@ -7,7 +7,7 @@ on:
|
||||||
env:
|
env:
|
||||||
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json"
|
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json"
|
||||||
ARDUINO_CLI_VERSION: "0.x"
|
ARDUINO_CLI_VERSION: "0.x"
|
||||||
ARDUINO_ESP32_VERSION: "2.0.11"
|
ARDUINO_ESP32_VERSION: "2.0.12"
|
||||||
ARDUINO_JSON_VERSION: "6.21.3"
|
ARDUINO_JSON_VERSION: "6.21.3"
|
||||||
ESPTOOL_VERSION: "4.6"
|
ESPTOOL_VERSION: "4.6"
|
||||||
LITTLEFS_VERSION: "v2.5.1"
|
LITTLEFS_VERSION: "v2.5.1"
|
||||||
|
|
|
||||||
|
|
@ -444,6 +444,7 @@ int8_t GitUpdater::downloadFile() {
|
||||||
delay(1);
|
delay(1);
|
||||||
if(total >= len) {
|
if(total >= len) {
|
||||||
if(!Update.end()) {
|
if(!Update.end()) {
|
||||||
|
Serial.println("Error downloading update...");
|
||||||
Update.printError(Serial);
|
Update.printError(Serial);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -453,9 +454,15 @@ int8_t GitUpdater::downloadFile() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(buff);
|
||||||
|
if(len < total) {
|
||||||
|
Serial.println("Error downloading file");
|
||||||
|
return -42;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
Serial.printf("Update %s complete\n", this->currentFile);
|
Serial.printf("Update %s complete\n", this->currentFile);
|
||||||
|
|
||||||
free(buff);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// TODO: memory allocation error.
|
// TODO: memory allocation error.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue