mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-11 15:22:13 +03:00
Utilized UPDATE_ERROR_ERASE, added _setError function and refactored code (#4190)
* Added _setError function in the header file _setError function wraps a few lines to eliminate repetitiveness when debugging for errors. * Added _setError function _setError function wraps a few lines to eliminate repetitiveness when debugging for errors.
This commit is contained in:
@ -61,11 +61,11 @@ class UpdaterClass {
|
||||
If all bytes are written
|
||||
this call will write the config to eboot
|
||||
and return true
|
||||
If there is already an update running but is not finished and !evenIfRemainanig
|
||||
If there is already an update running but is not finished and !evenIfRemaining
|
||||
or there is an error
|
||||
this will clear everything and return false
|
||||
the last error is available through getError()
|
||||
evenIfRemaining is helpfull when you update without knowing the final size first
|
||||
evenIfRemaining is helpful when you update without knowing the final size first
|
||||
*/
|
||||
bool end(bool evenIfRemaining = false);
|
||||
|
||||
@ -148,6 +148,8 @@ class UpdaterClass {
|
||||
bool _verifyHeader(uint8_t data);
|
||||
bool _verifyEnd();
|
||||
|
||||
void _setError(int error);
|
||||
|
||||
bool _async;
|
||||
uint8_t _error;
|
||||
uint8_t *_buffer;
|
||||
|
Reference in New Issue
Block a user