diff --git a/JeeUI2.h b/JeeUI2.h index 7fe7611..ddbe079 100644 --- a/JeeUI2.h +++ b/JeeUI2.h @@ -9,7 +9,7 @@ #include #else #include -#include "SPIFFS.h" +#include "LittleFS.h" #endif #include @@ -195,4 +195,4 @@ class jeeui2 }; -#endif \ No newline at end of file +#endif diff --git a/config.cpp b/config.cpp index b5dd662..0c69390 100644 --- a/config.cpp +++ b/config.cpp @@ -2,9 +2,9 @@ void jeeui2::save() { - if(SPIFFS.begin()){ + if(LittleFS.begin()){ } - File configFile = SPIFFS.open(F("/config.json"), "w"); + File configFile = LittleFS.open(F("/config.json"), "w"); String cfg_str; serializeJson(cfg, cfg_str); @@ -39,9 +39,9 @@ void jeeui2::as(){ void jeeui2::load() { - if(SPIFFS.begin()){ + if(LittleFS.begin()){ } - File pre_configFile = SPIFFS.open(F("/config.json"), "r"); + File pre_configFile = LittleFS.open(F("/config.json"), "r"); if (pre_configFile.readString() == "") { if(dbg)Serial.println(F("Failed to open config file")); @@ -52,4 +52,4 @@ void jeeui2::load() String cfg_str = configFile.readString(); deserializeJson(cfg, cfg_str); if(dbg)Serial.println(F("JSON config loaded")); -} \ No newline at end of file +} diff --git a/config.h b/config.h index 3b39520..25fe889 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ #ifdef ESP8266 #include #else -#include "SPIFFS.h" +#include "LittleFS.h" #endif -#endif \ No newline at end of file +#endif diff --git a/gpio.cpp b/gpio.cpp index 82aa327..d608eef 100644 --- a/gpio.cpp +++ b/gpio.cpp @@ -53,7 +53,7 @@ void jeeui2::btn() if (t + 15000 < millis()) // Нажатие 10 секунд { led_inv(); - SPIFFS.remove("/config.json"); + LittleFS.remove("/config.json"); ESP.restart(); } } @@ -91,4 +91,4 @@ void jeeui2::ui(void (*uiFunction) ()) void testFunction(){ -} \ No newline at end of file +}