Migrate to LittleFS under ESP8266

Make ESP8266 use LittleFS instead of deprecated SPIFFS
Make framework use the correct filesystem automatically and handle the call the FS.begin()
Change default MQTT keepalive to 60 seconds
Fix lodash security issue
This commit is contained in:
rjwats
2020-07-19 19:32:08 +01:00
committed by GitHub
parent 6ef5df28c1
commit c16f7693fd
13 changed files with 52 additions and 46 deletions

View File

@ -31,11 +31,11 @@ void SystemStatus::systemStatus(AsyncWebServerRequest* request) {
// TODO - Ideally this class will take an *FS and extract the file system information from there.
// ESP8266 and ESP32 do not have feature parity in FS.h which currently makes that difficult.
#ifdef ESP32
root["fs_total"] = SPIFFS.totalBytes();
root["fs_used"] = SPIFFS.usedBytes();
root["fs_total"] = ESPFS.totalBytes();
root["fs_used"] = ESPFS.usedBytes();
#elif defined(ESP8266)
FSInfo fs_info;
SPIFFS.info(fs_info);
ESPFS.info(fs_info);
root["fs_total"] = fs_info.totalBytes;
root["fs_used"] = fs_info.usedBytes;
#endif