revert on double task wait, normal and soft start working
This commit is contained in:
@@ -26,7 +26,7 @@ void trig_isr(void *arg)
|
||||
{
|
||||
case TRIG_FLAG_12P:
|
||||
case TRIG_FLAG_12N:
|
||||
//if (isr_firing_count == 0)
|
||||
// if (isr_firing_count == 0)
|
||||
{
|
||||
// only on first trigger to avoid multiple firing due to noise, to be fixed with hardware debounce
|
||||
isr_firing_count++;
|
||||
@@ -35,10 +35,9 @@ void trig_isr(void *arg)
|
||||
xTaskNotifyFromISR(task_handle, params->flag, eSetValueWithOverwrite, &xHigherPriorityTaskWoken);
|
||||
}
|
||||
break;
|
||||
|
||||
case TRIG_FLAG_34P:
|
||||
case TRIG_FLAG_34N:
|
||||
//if (isr_firing_count == 0)
|
||||
// if (isr_firing_count == 0)
|
||||
{
|
||||
// only on first trigger to avoid multiple firing due to noise, to be fixed with hardware debounce
|
||||
isr_firing_count++;
|
||||
@@ -48,24 +47,26 @@ void trig_isr(void *arg)
|
||||
}
|
||||
break;
|
||||
case SPARK_FLAG_12:
|
||||
//if (isr_firing_count > 0) // only consider spark if a trigger has been detected, otherwise noise on spark pin can cause false positives
|
||||
{
|
||||
box->coils34.spark_ok = false;
|
||||
box->coils12.spark_ok = true;
|
||||
box->coils12.spark_time = time_us;
|
||||
isr_firing_count = 0; // reset trigger timeout counter on spark event
|
||||
vTaskNotifyGiveFromISR(task_handle, &xHigherPriorityTaskWoken);
|
||||
}
|
||||
// if (isr_firing_count > 0) // only consider spark if a trigger has been detected, otherwise noise on spark pin can cause false positives
|
||||
{
|
||||
isr_firing_count = 0; // reset trigger timeout counter on spark event
|
||||
box->coils34.spark_ok = false;
|
||||
box->coils12.spark_ok = true;
|
||||
box->coils12.spark_time = time_us;
|
||||
xTaskNotifyFromISR(task_handle, params->flag, eSetValueWithOverwrite, &xHigherPriorityTaskWoken);
|
||||
// vTaskNotifyGiveFromISR(task_handle, &xHigherPriorityTaskWoken);
|
||||
}
|
||||
break;
|
||||
case SPARK_FLAG_34:
|
||||
//if (isr_firing_count > 0) // only consider spark if a trigger has been detected, otherwise noise on spark pin can cause false positives
|
||||
{
|
||||
box->coils12.spark_ok = false;
|
||||
box->coils34.spark_ok = true;
|
||||
box->coils34.spark_time = time_us;
|
||||
isr_firing_count = 0; // reset trigger timeout counter on spark event
|
||||
vTaskNotifyGiveFromISR(task_handle, &xHigherPriorityTaskWoken);
|
||||
}
|
||||
// if (isr_firing_count > 0) // only consider spark if a trigger has been detected, otherwise noise on spark pin can cause false positives
|
||||
{
|
||||
isr_firing_count = 0; // reset trigger timeout counter on spark event
|
||||
box->coils12.spark_ok = false;
|
||||
box->coils34.spark_ok = true;
|
||||
box->coils34.spark_time = time_us;
|
||||
xTaskNotifyFromISR(task_handle, params->flag, eSetValueWithOverwrite, &xHigherPriorityTaskWoken);
|
||||
// vTaskNotifyGiveFromISR(task_handle, &xHigherPriorityTaskWoken);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user