restore default littleFS
This commit is contained in:
@@ -29,6 +29,7 @@ build_flags =
|
|||||||
-DHARDWARE=2
|
-DHARDWARE=2
|
||||||
-DCORE_DEBUG_LEVEL=3
|
-DCORE_DEBUG_LEVEL=3
|
||||||
-DNDEF_DEBUG=1
|
-DNDEF_DEBUG=1
|
||||||
|
-fexceptions
|
||||||
extra_scripts = ./littlefsbuilder.py
|
extra_scripts = ./littlefsbuilder.py
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "FS.h"
|
#include "FS.h"
|
||||||
#include "LITTLEFS.h"
|
#include <LittleFS.h>
|
||||||
#include "ArduinoJson.h"
|
#include "ArduinoJson.h"
|
||||||
|
|
||||||
const char *tagConfigfile = "/settings.json";
|
const char *tagConfigfile = "/settings.json";
|
||||||
@@ -86,7 +86,7 @@ float getFloatParam(String param, int def)
|
|||||||
void loadConfig(const char *fname)
|
void loadConfig(const char *fname)
|
||||||
{
|
{
|
||||||
log_i("config: load");
|
log_i("config: load");
|
||||||
File file = LITTLEFS.open(fname);
|
File file = LittleFS.open(fname);
|
||||||
|
|
||||||
DeserializationError error = deserializeJson(settingsDoc, file);
|
DeserializationError error = deserializeJson(settingsDoc, file);
|
||||||
if (error)
|
if (error)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "ArduinoOTA.h"
|
#include "ArduinoOTA.h"
|
||||||
#include "JC_Button.h"
|
#include "JC_Button.h"
|
||||||
#include "LITTLEFS.h"
|
#include "LittleFS.h"
|
||||||
|
|
||||||
#define WIFICONNECTINTERVAL 1000
|
#define WIFICONNECTINTERVAL 1000
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#define ESP_V2
|
#define ESP_V2
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <LITTLEFS.h>
|
#include <LittleFS.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LITTLEFS_FOR_IDF_3_2
|
#ifndef CONFIG_LITTLEFS_FOR_IDF_3_2
|
||||||
@@ -92,12 +92,12 @@ void readFile(fs::FS &fs, const char *path)
|
|||||||
|
|
||||||
void initStorage()
|
void initStorage()
|
||||||
{
|
{
|
||||||
if (!LITTLEFS.begin(FORMAT_LITTLEFS_IF_FAILED))
|
if (!LittleFS.begin(FORMAT_LITTLEFS_IF_FAILED))
|
||||||
{
|
{
|
||||||
log_e("LITTLEFS Mount Failed");
|
log_e("LittleFS Mount Failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
listDir(LITTLEFS, "/", 0);
|
listDir(LittleFS, "/", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleStorage()
|
void handleStorage()
|
||||||
|
|||||||
Reference in New Issue
Block a user