better state validation
This commit is contained in:
parent
06e522a4f0
commit
adf6b99b38
|
@ -287,8 +287,10 @@ int TriggerShape::findAngleIndex(float target DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
}
|
||||
|
||||
void TriggerShape::findTriggerPosition(event_trigger_position_s *position, angle_t angleOffset DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
efiAssertVoid(!cisnan(angleOffset), "findAngle#1");
|
||||
// convert engine cycle angle into trigger cycle angle
|
||||
angleOffset += tdcPosition();
|
||||
efiAssertVoid(!cisnan(angleOffset), "findAngle#2");
|
||||
fixAngle(angleOffset, "addFuel#2");
|
||||
|
||||
int index = triggerIndexByAngle[(int)angleOffset];
|
||||
|
|
Loading…
Reference in New Issue