use buildin LittleFS

This commit is contained in:
MichaelDvP
2022-04-25 17:02:50 +02:00
parent fbec88f6c8
commit 986b4df997
19 changed files with 12 additions and 8839 deletions

View File

@@ -28,9 +28,9 @@ ESP8266React EMSESP::esp8266React(&webServer, &dummyFS);
WebSettingsService EMSESP::webSettingsService = WebSettingsService(&webServer, &dummyFS, EMSESP::esp8266React.getSecurityManager());
WebCustomizationService EMSESP::webCustomizationService = WebCustomizationService(&webServer, &dummyFS, EMSESP::esp8266React.getSecurityManager());
#else
ESP8266React EMSESP::esp8266React(&webServer, &LITTLEFS);
WebSettingsService EMSESP::webSettingsService = WebSettingsService(&webServer, &LITTLEFS, EMSESP::esp8266React.getSecurityManager());
WebCustomizationService EMSESP::webCustomizationService = WebCustomizationService(&webServer, &LITTLEFS, EMSESP::esp8266React.getSecurityManager());
ESP8266React EMSESP::esp8266React(&webServer, &LittleFS);
WebSettingsService EMSESP::webSettingsService = WebSettingsService(&webServer, &LittleFS, EMSESP::esp8266React.getSecurityManager());
WebCustomizationService EMSESP::webCustomizationService = WebCustomizationService(&webServer, &LittleFS, EMSESP::esp8266React.getSecurityManager());
#endif
WebStatusService EMSESP::webStatusService = WebStatusService(&webServer, EMSESP::esp8266React.getSecurityManager());
@@ -1373,8 +1373,8 @@ void EMSESP::start() {
// start the file system
#ifndef EMSESP_STANDALONE
if (!LITTLEFS.begin(true)) {
Serial.println("LITTLEFS Mount Failed. EMS-ESP stopped.");
if (!LittleFS.begin(true)) {
Serial.println("LittleFS Mount Failed. EMS-ESP stopped.");
return;
}
#endif

View File

@@ -245,7 +245,7 @@ void System::format(uuid::console::Shell & shell) {
EMSuart::stop();
#ifndef EMSESP_STANDALONE
LITTLEFS.format();
LittleFS.format();
#endif
System::system_restart();
@@ -432,7 +432,7 @@ void System::button_OnVLongPress(PButton & b) {
EMSESP::console_.loop();
#ifdef EMSESP_DEBUG
Test::listDir(LITTLEFS, FS_CONFIG_DIRECTORY, 3);
Test::listDir(LittleFS, FS_CONFIG_DIRECTORY, 3);
#endif
EMSESP::esp8266React.factoryReset();

View File

@@ -1626,7 +1626,7 @@ void Test::debug(uuid::console::Shell & shell, const std::string & cmd) {
#ifndef EMSESP_STANDALONE
if (command == "ls") {
listDir(LITTLEFS, "/", 3);
listDir(LittleFS, "/", 3);
}
#endif
}

View File

@@ -148,7 +148,7 @@ StateUpdateResult WebCustomization::update(JsonObject & root, WebCustomization &
// deletes the customization file
void WebCustomizationService::reset_customization(AsyncWebServerRequest * request) {
#ifndef EMSESP_STANDALONE
if (LITTLEFS.remove(EMSESP_CUSTOMIZATION_FILE)) {
if (LittleFS.remove(EMSESP_CUSTOMIZATION_FILE)) {
AsyncWebServerResponse * response = request->beginResponse(200); // OK
request->send(response);
EMSESP::system_.restart_requested(true);