adc read ok, very slow
This commit is contained in:
@@ -162,6 +162,7 @@ void rtIgnitionTask(void *pvParameters)
|
||||
continue;
|
||||
}
|
||||
|
||||
// Select coil status reference based on pickup_flag
|
||||
coilsStatus *coils;
|
||||
switch (pickup_flag)
|
||||
{
|
||||
@@ -176,6 +177,7 @@ void rtIgnitionTask(void *pvParameters)
|
||||
break;
|
||||
}
|
||||
|
||||
// Select logic based on pickup and spark flags
|
||||
switch (pickup_flag)
|
||||
{
|
||||
case TRIG_FLAG_12P:
|
||||
@@ -249,7 +251,6 @@ void rtIgnitionTask(void *pvParameters)
|
||||
{
|
||||
cycle12 = false;
|
||||
cycle34 = false;
|
||||
// vTaskDelay(pdMS_TO_TICKS(1)); // delay 1ms to allow peak detectors to charge for negative cycle
|
||||
// read adc channels: pickup12, out12 [ pos + neg ]
|
||||
if (adc) // read only if adc initialized
|
||||
{
|
||||
@@ -283,7 +284,9 @@ void rtIgnitionTask(void *pvParameters)
|
||||
ign_box_sts.timestamp = esp_timer_get_time(); // update data timestamp
|
||||
if (xQueueSendToBack(rt_queue, (void *)&ign_box_sts, 0) != pdPASS)
|
||||
{
|
||||
ign_box_sts.n_queue_errors++;
|
||||
static uint32_t n_errors = 0;
|
||||
n_errors++;
|
||||
ign_box_sts.n_queue_errors = n_errors;
|
||||
LOG_ERROR("Failed to send to rt_queue");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user