task refactoring work in progress
This commit is contained in:
@@ -15,14 +15,6 @@
|
||||
#include "psvector.h"
|
||||
|
||||
const uint32_t max_history = 256;
|
||||
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
|
||||
{
|
||||
const PSRAMVector<ignitionBoxStatus> *history;
|
||||
const std::filesystem::path file_path;
|
||||
};
|
||||
|
||||
class LITTLEFSGuard
|
||||
{
|
||||
@@ -31,7 +23,7 @@ public:
|
||||
~LITTLEFSGuard();
|
||||
};
|
||||
|
||||
class ignitionBoxStatusAverage
|
||||
class ignitionBoxStatusFiltered
|
||||
{
|
||||
private:
|
||||
ignitionBoxStatus m_last;
|
||||
@@ -40,8 +32,8 @@ private:
|
||||
bool m_data_valid = false; // flag to indicate if the average data is valid (i.e. at least one sample has been added)
|
||||
|
||||
public:
|
||||
ignitionBoxStatusAverage() = default;
|
||||
ignitionBoxStatusAverage(const uint32_t max_count) : m_max_count(max_count)
|
||||
ignitionBoxStatusFiltered() = default;
|
||||
ignitionBoxStatusFiltered(const uint32_t max_count) : m_max_count(max_count)
|
||||
{
|
||||
m_data_valid = false;
|
||||
m_count = 0;
|
||||
|
||||
Reference in New Issue
Block a user