better state constraint

This commit is contained in:
rusEfi 2018-01-25 19:19:35 -05:00
parent ecea4f4be0
commit d8ffaa9015
1 changed files with 1 additions and 0 deletions

View File

@ -223,6 +223,7 @@ void prepareIgnitionSchedule(IgnitionEvent *event DECLARE_ENGINE_PARAMETER_SUFFI
// change of sign here from 'before TDC' to 'after TDC'
const angle_t localAdvance = -ENGINE(engineState.timingAdvance) + ENGINE(angleExtra[event->cylinderIndex]) + CONFIG(timing_offset_cylinder[event->cylinderIndex]);
efiAssertVoid(!cisnan(localAdvance), "localAdvance#1");
const int index = ENGINE(ignitionPin[event->cylinderIndex]);
const int coilIndex = ID2INDEX(getCylinderId(index PASS_ENGINE_PARAMETER_SUFFIX));
IgnitionOutputPin *output = &enginePins.coils[coilIndex];