Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 97e6c5d

Browse files
authoredOct 23, 2024··
Update Updater.cpp
1 parent 0166ae3 commit 97e6c5d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
 

‎libraries/Update/src/Updater.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "Update.h"
88
#include "Arduino.h"
9+
#include "spi_flash_mmap.h"
910
#include "esp_ota_ops.h"
1011
#include "esp_image_format.h"
1112
#include "mbedtls/aes.h"
@@ -123,7 +124,7 @@ bool UpdateClass::begin(size_t size, int command, int ledPin, uint8_t ledOn, con
123124
_reset();
124125
_error = 0;
125126
_target_md5 = emptyString;
126-
_md5 = MD5Builder();
127+
_md5 = MD5Builder();
127128

128129
if (size == 0) {
129130
_error = UPDATE_ERROR_SIZE;
@@ -170,7 +171,7 @@ bool UpdateClass::begin(size_t size, int command, int ledPin, uint8_t ledOn, con
170171
}
171172
_size = size;
172173
_command = command;
173-
_md5.begin();
174+
_md5.begin();
174175
return true;
175176
}
176177

@@ -458,7 +459,6 @@ bool UpdateClass::setMD5(const char *expected_md5, bool calc_post_decryption=tru
458459
}
459460
_target_md5 = expected_md5;
460461
_target_md5.toLowerCase();
461-
462462
_target_md5_decrypted=calc_post_decryption;
463463
return true;
464464
}
@@ -481,8 +481,7 @@ bool UpdateClass::end(bool evenIfRemaining) {
481481
_size = progress();
482482
}
483483

484-
_md5.calculate();
485-
484+
_md5.calculate();
486485
if (_target_md5.length()) {
487486
if (_target_md5 != _md5.toString()) {
488487
_abort(UPDATE_ERROR_MD5);

0 commit comments

Comments
 (0)
Please sign in to comment.