mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
use buildin LittleFS
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user