From 0116f9c729a03dc52ad743cbf9e12c497154fd09 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 17 Mar 2024 18:52:40 +0000 Subject: [PATCH] add the missing getErrorString() cases --- cores/esp8266/Updater.cpp | 6 ++++++ cores/esp8266/Updater.h | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cores/esp8266/Updater.cpp b/cores/esp8266/Updater.cpp index 7d721609bf..b4961b616d 100644 --- a/cores/esp8266/Updater.cpp +++ b/cores/esp8266/Updater.cpp @@ -651,6 +651,12 @@ String UpdaterClass::getErrorString() const { case UPDATE_ERROR_OOM: out = F("Out of memory"); break; + case UPDATE_ERROR_RUNNING_ALREADY: + out = F("Update already running"); + break; + case UPDATE_ERROR_UNKNOWN_COMMAND: + out = F("Unknown update command"); + break; default: out = F("UNKNOWN"); break; diff --git a/cores/esp8266/Updater.h b/cores/esp8266/Updater.h index dd2539aa65..7ee1d28311 100644 --- a/cores/esp8266/Updater.h +++ b/cores/esp8266/Updater.h @@ -57,7 +57,7 @@ class UpdaterClass { using THandlerFunction_Progress = std::function; using THandlerFunction_Error = std::function; using THandlerFunction = std::function; - + UpdaterClass(); ~UpdaterClass(); @@ -71,7 +71,7 @@ class UpdaterClass { bool begin(size_t size, int command = U_FLASH, int ledPin = -1, uint8_t ledOn = LOW); /* - Run Updater from asynchronous callbacs + Run Updater from asynchronous callbacks */ void runAsync(bool async){ _async = async; } @@ -218,7 +218,7 @@ class UpdaterClass { bool _verifyHeader(uint8_t data); bool _verifyEnd(); - void _setError(int error); + void _setError(int error); bool _async = false; uint8_t _error = 0;