trailing spark outputs fix #2931

This commit is contained in:
Andrey 2021-07-22 00:01:54 -04:00
parent 2e58611e4f
commit 8b5dde5a8f
1 changed files with 3 additions and 1 deletions

View File

@ -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
);
}