wow we have weird code!

This commit is contained in:
Andrey 2021-07-02 19:49:00 -04:00
parent e766279b5b
commit 00ea760979
1 changed files with 5 additions and 1 deletions

View File

@ -155,7 +155,11 @@ void calculateTriggerSynchPoint(
void prepareEventAngles(TriggerWaveform *shape,
TriggerFormDetails *details DECLARE_ENGINE_PARAMETER_SUFFIX) {
float firstAngle = shape->getAngle(shape->triggerShapeSynchPointIndex);
int triggerShapeSynchPointIndex = shape->triggerShapeSynchPointIndex;
if (triggerShapeSynchPointIndex == EFI_ERROR_CODE) {
return;
}
float firstAngle = shape->getAngle(triggerShapeSynchPointIndex);
assertAngleRange(firstAngle, "firstAngle", CUSTOM_TRIGGER_SYNC_ANGLE);
int riseOnlyIndex = 0;