format LittleFS on erased ESP8266 - #492

This commit is contained in:
proddy
2020-09-14 00:06:57 +02:00
parent 7423f10928
commit 476b42542f

View File

@@ -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;
} }