Skip to content

Commit

Permalink
add the missing getErrorString() cases
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSDavidSoft committed Mar 17, 2024
1 parent ef5c856 commit 0116f9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions cores/esp8266/Updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions cores/esp8266/Updater.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class UpdaterClass {
using THandlerFunction_Progress = std::function<void(size_t, size_t)>;
using THandlerFunction_Error = std::function<void(uint8_t)>;
using THandlerFunction = std::function<void()>;

UpdaterClass();
~UpdaterClass();

Expand All @@ -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; }

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0116f9c

Please sign in to comment.