mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
format LittleFS on erased ESP8266 - #492
This commit is contained in:
@@ -633,7 +633,6 @@ bool System::check_upgrade() {
|
|||||||
#if defined(EMSESP_DEBUG)
|
#if defined(EMSESP_DEBUG)
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
Serial.println(F("FS is Littlefs"));
|
Serial.println(F("FS is Littlefs"));
|
||||||
Serial.flush();
|
|
||||||
Serial.end();
|
Serial.end();
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
@@ -649,9 +648,11 @@ bool System::check_upgrade() {
|
|||||||
#if defined(EMSESP_DEBUG)
|
#if defined(EMSESP_DEBUG)
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
Serial.println(F("No old SPIFFS found!"));
|
Serial.println(F("No old SPIFFS found!"));
|
||||||
Serial.flush();
|
|
||||||
Serial.end();
|
Serial.end();
|
||||||
#endif
|
#endif
|
||||||
|
// if there is neither SPIFFS or LittleFS we can assume the ESP8266 has been erased
|
||||||
|
l_cfg.setAutoFormat(true); // reset to normal behaviour
|
||||||
|
LittleFS.setConfig(l_cfg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user