Finalized PINMAP
This commit is contained in:
@@ -78,13 +78,6 @@ void rtIgnitionTask(void *pvParameters)
|
||||
|
||||
LOG_INFO("rtTask ISR Attach OK");
|
||||
|
||||
// Compute Reset Pin Bitmask
|
||||
const uint16_t rst_bitmask = (1 << rt_rst.rst_io_12p) |
|
||||
(1 << rt_rst.rst_io_12n) |
|
||||
(1 << rt_rst.rst_io_34p) |
|
||||
(1 << rt_rst.rst_io_34n);
|
||||
|
||||
LOG_WARN("rtTask Init Correct");
|
||||
// Global rt_task_ptr variables
|
||||
bool first_cycle = true;
|
||||
bool cycle12 = false;
|
||||
@@ -107,22 +100,6 @@ void rtIgnitionTask(void *pvParameters)
|
||||
if (first_cycle && pickup_flag != TRIG_FLAG_12P) // skip first cycle because of possible initial noise on pickup signals at startu
|
||||
continue;
|
||||
|
||||
#ifdef DEBUG
|
||||
Serial.print("\033[2J"); // clear screen
|
||||
Serial.print("\033[H"); // cursor home
|
||||
|
||||
if (!names.contains(pickup_flag))
|
||||
{
|
||||
LOG_ERROR("Wrong Pickup Flag");
|
||||
LOG_ERROR("Pickup Flags: ", printBits(pickup_flag).c_str());
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_INFO("Pickup Trigger: ", names.at(pickup_flag));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Start microsecond precision timeout timer
|
||||
esp_timer_stop(timeout_timer); // stop timer in case it was running from previous cycle
|
||||
esp_timer_start_once(timeout_timer, spark_timeout_max);
|
||||
@@ -257,6 +234,7 @@ void rtIgnitionTask(void *pvParameters)
|
||||
if (io)
|
||||
{
|
||||
const uint16_t iostat = io->read();
|
||||
const uint16_t rst_bitmask = (0x0001 << rt_rst.rst_io_peak);
|
||||
io->write(iostat | rst_bitmask);
|
||||
vTaskDelay(pdMS_TO_TICKS(1));
|
||||
io->write(iostat & ~rst_bitmask);
|
||||
|
||||
Reference in New Issue
Block a user