better state constraint
This commit is contained in:
parent
ecea4f4be0
commit
d8ffaa9015
|
@ -223,6 +223,7 @@ void prepareIgnitionSchedule(IgnitionEvent *event DECLARE_ENGINE_PARAMETER_SUFFI
|
||||||
|
|
||||||
// change of sign here from 'before TDC' to 'after TDC'
|
// 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]);
|
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 index = ENGINE(ignitionPin[event->cylinderIndex]);
|
||||||
const int coilIndex = ID2INDEX(getCylinderId(index PASS_ENGINE_PARAMETER_SUFFIX));
|
const int coilIndex = ID2INDEX(getCylinderId(index PASS_ENGINE_PARAMETER_SUFFIX));
|
||||||
IgnitionOutputPin *output = &enginePins.coils[coilIndex];
|
IgnitionOutputPin *output = &enginePins.coils[coilIndex];
|
||||||
|
|
Loading…
Reference in New Issue