adding pins and task class
This commit is contained in:
@@ -2,12 +2,14 @@
|
||||
#define DEBUGLOG_DEFAULT_LOG_LEVEL_DEBUG
|
||||
|
||||
// Serial debug flag
|
||||
//#define DEBUG
|
||||
// #define DEBUG
|
||||
|
||||
// Arduino Libraries
|
||||
#include <Arduino.h>
|
||||
#include <DebugLog.h>
|
||||
#include "utils.h"
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
// ISR
|
||||
#include "isr.h"
|
||||
@@ -60,4 +62,39 @@ struct rtTaskParams
|
||||
const rtTaskResets rt_resets; // reset ping for peak detectors
|
||||
};
|
||||
|
||||
void rtIgnitionTask(void *pvParameters);
|
||||
|
||||
class rtIgnitionTask
|
||||
{
|
||||
|
||||
using PShistory = PSRAMVector<ignitionBoxStatus>;
|
||||
|
||||
public:
|
||||
rtIgnitionTask();
|
||||
~rtIgnitionTask();
|
||||
|
||||
static void rtIgnitionTask_run(void *pvParameters);
|
||||
|
||||
void run();
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
private:
|
||||
bool m_running = true;
|
||||
|
||||
std::shared_ptr<Devices> m_devices;
|
||||
std::string m_name;
|
||||
TaskHandle_t m_handle;
|
||||
QueueHandle_t m_queue;
|
||||
rtTaskParams m_params;
|
||||
|
||||
PShistory m_history_0;
|
||||
PShistory m_history_1;
|
||||
|
||||
std::unique_ptr<PShistory> m_active_history;
|
||||
std::unique_ptr<PShistory> m_save_history;
|
||||
|
||||
|
||||
fs::FS m_filesystem;
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user