diff --git a/firmware/controllers/engine_cycle/spark_logic.cpp b/firmware/controllers/engine_cycle/spark_logic.cpp index d5438a12f9..260d3fab93 100644 --- a/firmware/controllers/engine_cycle/spark_logic.cpp +++ b/firmware/controllers/engine_cycle/spark_logic.cpp @@ -288,10 +288,12 @@ void turnSparkPinHigh(IgnitionEvent *event) { } if (CONFIG(enableTrailingSparks)) { + IgnitionOutputPin *output = &enginePins.trailingCoils[event->cylinderNumber]; + INJECT_ENGINE_REFERENCE(output); // Trailing sparks are enabled - schedule an event for the corresponding trailing coil scheduleByAngle( &event->trailingSparkCharge, nowNt, ENGINE(engineState.trailingSparkAngle), - { &chargeTrailingSpark, &enginePins.trailingCoils[event->cylinderNumber] } + { &chargeTrailingSpark, output } PASS_ENGINE_PARAMETER_SUFFIX ); }