From 0159e8e32b543f992437daf1e005546c6c8de971 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 6 Sep 2021 15:29:36 -0400 Subject: [PATCH] Smart ECU: misfire detection #936 --- firmware/controllers/engine_cycle/spark_logic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/controllers/engine_cycle/spark_logic.cpp b/firmware/controllers/engine_cycle/spark_logic.cpp index db49e4d0c8..efb98ca340 100644 --- a/firmware/controllers/engine_cycle/spark_logic.cpp +++ b/firmware/controllers/engine_cycle/spark_logic.cpp @@ -534,7 +534,7 @@ void onTriggerEventSparkLogic(bool limitedSpark, uint32_t trgEventIndex, int rpm if (event->dwellPosition.triggerEventIndex != trgEventIndex) continue; - if (i == 0 && CONFIG(artificialTestMisfire) && (engine->globalSparkIdCounter % ((int)engineConfiguration->fsio_setting[5]) == 0)) { + if (i == 0 && CONFIG(artificialTestMisfire) && (getRevolutionCounter() % ((int)engineConfiguration->fsio_setting[5]) == 0)) { // artificial misfire on cylinder #1 for testing purposes // enable artificialMisfire // set_fsio_setting 6 20