LittleFS mount OK, updated interface, upload to littlefs from browser
This commit is contained in:
@@ -4,19 +4,19 @@
|
||||
// System Includes
|
||||
#include <Arduino.h>
|
||||
#include <DebugLog.h>
|
||||
#include <LittleFS.h>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <ArduinoJson.h>
|
||||
#include <filesystem>
|
||||
#include <LittleFS.h>
|
||||
|
||||
// Project Includes
|
||||
#include "isr.h"
|
||||
#include "psvector.h"
|
||||
|
||||
const uint32_t max_history = 256;
|
||||
const bool SAVE_HISTORY_TO_LITTLEFS = false; // Set to true to enable saving history to SPIFFS, false to disable
|
||||
static bool first_save = true; // flag to indicate if this is the first save (to write header)
|
||||
const bool SAVE_HISTORY_TO_LITTLEFS = false; // Set to true to enable saving history to LittleFS, false to disable
|
||||
static bool first_save = true; // flag to indicate if this is the first save (to write header)
|
||||
|
||||
struct dataSaveParams
|
||||
{
|
||||
@@ -27,20 +27,8 @@ struct dataSaveParams
|
||||
class LITTLEFSGuard
|
||||
{
|
||||
public:
|
||||
LITTLEFSGuard()
|
||||
{
|
||||
if (!LittleFS.begin(true))
|
||||
{
|
||||
LOG_ERROR("Failed to mount LittleFS");
|
||||
}
|
||||
LOG_INFO("SPIFFS mounted successfully");
|
||||
}
|
||||
|
||||
~LITTLEFSGuard()
|
||||
{
|
||||
LittleFS.end();
|
||||
LOG_INFO("LittleFS unmounted successfully");
|
||||
}
|
||||
LITTLEFSGuard();
|
||||
~LITTLEFSGuard();
|
||||
};
|
||||
|
||||
class ignitionBoxStatusAverage
|
||||
@@ -53,7 +41,8 @@ private:
|
||||
|
||||
public:
|
||||
ignitionBoxStatusAverage() = default;
|
||||
ignitionBoxStatusAverage(const uint32_t max_count) : m_max_count(max_count) {
|
||||
ignitionBoxStatusAverage(const uint32_t max_count) : m_max_count(max_count)
|
||||
{
|
||||
m_data_valid = false;
|
||||
m_count = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user