Skip to content

Commit e99f511

Browse files
committed
added the possibilities to force SPIFFS update
1 parent 2bbc9cb commit e99f511

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/esp32FOTA.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,15 @@ void esp32FOTA::forceUpdate(const char* firmwareURL, bool validate )
851851
execOTA();
852852
}
853853

854+
// Force a firmware update regardless on current version
855+
void esp32FOTA::forceUpdateSPIFFS(const char* firmwareURL, bool validate )
856+
{
857+
_firmwareUrl = firmwareURL;
858+
_flashFileSystemUrl = firmwareURL;
859+
_cfg.check_sig = validate;
860+
execOTA();
861+
}
862+
854863

855864
void esp32FOTA::forceUpdate(const char* firmwareHost, uint16_t firmwarePort, const char* firmwarePath, bool validate )
856865
{

src/esp32FOTA.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ class esp32FOTA
246246
void forceUpdate(const char* firmwareURL, bool validate );
247247
void forceUpdate(bool validate );
248248

249+
void forceUpdateSPIFFS(const char* firmwareURL, bool validate );
250+
249251
void handle();
250252

251253
bool execOTA();

0 commit comments

Comments
 (0)