changed partition to littlefs, not working yet
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
// System Includes
|
||||
#include <Arduino.h>
|
||||
#include <DebugLog.h>
|
||||
#include <SPIFFS.h>
|
||||
#include <LittleFS.h>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
@@ -24,22 +24,22 @@ struct dataSaveParams
|
||||
const std::filesystem::path file_path;
|
||||
};
|
||||
|
||||
class SPIFFSGuard
|
||||
class LITTLEFSGuard
|
||||
{
|
||||
public:
|
||||
SPIFFSGuard()
|
||||
LITTLEFSGuard()
|
||||
{
|
||||
if (!SPIFFS.begin(true))
|
||||
if (!LittleFS.begin(true))
|
||||
{
|
||||
LOG_ERROR("Failed to mount SPIFFS");
|
||||
LOG_ERROR("Failed to mount LittleFS");
|
||||
}
|
||||
LOG_INFO("SPIFFS mounted successfully");
|
||||
}
|
||||
|
||||
~SPIFFSGuard()
|
||||
~LITTLEFSGuard()
|
||||
{
|
||||
SPIFFS.end();
|
||||
LOG_INFO("SPIFFS unmounted successfully");
|
||||
LittleFS.end();
|
||||
LOG_INFO("LittleFS unmounted successfully");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user