Add more error messages in firmware download

This commit is contained in:
Robert Strouse 2023-12-30 18:15:51 -08:00
parent 7a0ff2dffb
commit b86bbdaa4a
2 changed files with 10 additions and 3 deletions

View file

@ -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"

View file

@ -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() {
} }
} }
} }
Serial.printf("Update %s complete\n", this->currentFile);
free(buff); free(buff);
if(len < total) {
Serial.println("Error downloading file");
return -42;
}
else
Serial.printf("Update %s complete\n", this->currentFile);
} }
else { else {
// TODO: memory allocation error. // TODO: memory allocation error.