revert on double task wait, normal and soft start working

This commit is contained in:
2026-04-04 20:00:30 +02:00
parent b0842aadef
commit 38c595fd7b
8 changed files with 128 additions and 91 deletions

View File

@@ -63,36 +63,41 @@ static const std::map<const sparkStatus, const char *> sparkStatusNames = {
enum softStartStatus
{
NORMAL,
SOFT_START
SOFT_START,
ERROR,
};
const std::map<const softStartStatus, const char *> softStartStatusNames = {
{NORMAL, "NORMAL"},
{SOFT_START, "SOFT_START"},
{ERROR, "ERROR"},
};
struct coilsStatus
{
int64_t trig_time;
int64_t spark_time;
int64_t spark_delay;
sparkStatus spark_status;
softStartStatus sstart_status;
float peak_p_in, peak_n_in;
float peak_p_out, peak_n_out;
float trigger_spark;
bool spark_ok;
int64_t trig_time = 0;
int64_t spark_time = 0;
int64_t spark_delay = 0; // in microseconds
sparkStatus spark_status = sparkStatus::SPARK_POS_OK;
softStartStatus sstart_status = softStartStatus::NORMAL;
float peak_p_in = 0.0, peak_n_in = 0.0;
float peak_p_out = 0.0, peak_n_out = 0.0;
float trigger_spark = 0.0;
bool spark_ok = false;
uint32_t n_events = 0;
};
// Task internal Status
struct ignitionBoxStatus
{
int64_t timestamp;
int64_t timestamp = 0;
// coils pairs for each ignition
coilsStatus coils12;
coilsStatus coils34;
// voltage from generator
float volts_gen = 0.0;
uint32_t n_queue_errors = 0;
};
struct isrParams