mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49: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)
|
||||
Serial.begin(115200);
|
||||
Serial.println(F("FS is Littlefs"));
|
||||
Serial.flush();
|
||||
Serial.end();
|
||||
#endif
|
||||
return false;
|
||||
@@ -649,9 +648,11 @@ bool System::check_upgrade() {
|
||||
#if defined(EMSESP_DEBUG)
|
||||
Serial.begin(115200);
|
||||
Serial.println(F("No old SPIFFS found!"));
|
||||
Serial.flush();
|
||||
Serial.end();
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user