changed partition to littlefs, not working yet

This commit is contained in:
Emanuele Trabattoni
2026-04-08 17:10:30 +02:00
parent 12e1e8e7a4
commit 97bce90ba6
5 changed files with 30 additions and 23 deletions

View File

@@ -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");
}
};