File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,19 @@ void ArduinoOTAClass::_onRx() {
243243void ArduinoOTAClass::_runUpdate () {
244244 IPAddress ota_ip = _ota_ip;
245245
246+ if (!LittleFS.begin ()) {
247+ #ifdef OTA_DEBUG
248+ OTA_DEBUG.println (" LittleFS Begin Error" );
249+ #endif
250+ _udp_ota->append (" ERR: " , 5 );
251+ _udp_ota->append (" no filesystem" , 13 );
252+ _udp_ota->send (ota_ip, _ota_udp_port);
253+ delay (100 );
254+ _udp_ota->listen (IP_ADDR_ANY, _port);
255+ _state = OTA_IDLE;
256+ return ;
257+ }
258+
246259 if (!Update.begin (_size, _cmd)) {
247260#ifdef OTA_DEBUG
248261 OTA_DEBUG.println (" Update Begin Error" );
@@ -261,15 +274,6 @@ void ArduinoOTAClass::_runUpdate() {
261274 _state = OTA_IDLE;
262275 return ;
263276 }
264- if (!LittleFS.begin ()) {
265- _udp_ota->append (" ERR: " , 5 );
266- _udp_ota->append (" nofilesystem" , 6 );
267- _udp_ota->send (ota_ip, _ota_udp_port);
268- delay (100 );
269- _udp_ota->listen (IP_ADDR_ANY, _port);
270- _state = OTA_IDLE;
271- return ;
272- }
273277
274278 _udp_ota->append (" OK" , 2 );
275279 _udp_ota->send (ota_ip, _ota_udp_port);
Original file line number Diff line number Diff line change 2929#include < string.h>
3030#include < Arduino.h>
3131#include " StackThunk.h"
32- // #include <Updater_Signing.h>
32+
33+ #include < Updater_Signing.h>
3334#ifndef ARDUINO_SIGNING
3435#define ARDUINO_SIGNING 0
3536#endif
You can’t perform that action at this time.
0 commit comments