diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 504e428a20..e64d45e262 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -305,8 +305,7 @@ void Engine::watchdog() { } IgnitionEventList * Engine::ignitionList() { -// int revolutionIndex = rpmCalculator.getRevolutionCounter() % 2; - return &engineConfiguration2->ignitionEvents[0]; + return &engineConfiguration2->ignitionEvents; } void Engine::prepareFuelSchedule(DECLARE_ENGINE_PARAMETER_F) { diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index aa21e69aa4..1c7de567e4 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -94,11 +94,7 @@ public: float fsioLastValue[LE_COMMAND_COUNT]; - /** - * We are alternating two event lists in order to avoid a potential issue around revolution boundary - * when an event is scheduled within the next revolution. - */ - IgnitionEventList ignitionEvents[2]; + IgnitionEventList ignitionEvents; }; class ThermistorMath { diff --git a/unit_tests/test_trigger_decoder.cpp b/unit_tests/test_trigger_decoder.cpp index 9976339fbc..c6a4b08a15 100644 --- a/unit_tests/test_trigger_decoder.cpp +++ b/unit_tests/test_trigger_decoder.cpp @@ -148,7 +148,7 @@ void test1995FordInline6TriggerDecoder(void) { eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_F); eth.fireTriggerEvents(48); - IgnitionEventList *ecl = ð.ec2.ignitionEvents[0]; + IgnitionEventList *ecl = ð.ec2.ignitionEvents; assertEqualsM("ford inline ignition events size", 1, ecl->isReady); assertEqualsM("event index", 0, ecl->elements[0].dwellPosition.eventIndex); assertEqualsM("angle offset#1", 7, ecl->elements[0].dwellPosition.angleOffset); @@ -300,7 +300,7 @@ void testRpmCalculator(void) { EngineTestHelper eth(FORD_INLINE_6_1995); EXPAND_EngineTestHelper; - IgnitionEventList *ilist = ð.engine.engineConfiguration2->ignitionEvents[0]; + IgnitionEventList *ilist = ð.engine.engineConfiguration2->ignitionEvents; assertEqualsM("size #1", 0, ilist->isReady); assertEqualsM("engineCycle", 720, eth.engine.engineCycle);