refactoring: better variable names

This commit is contained in:
rusefi 2019-10-08 00:42:47 -04:00
parent 0d31cdddea
commit 8424723024
1 changed files with 7 additions and 7 deletions

View File

@ -365,16 +365,16 @@ void TriggerShape::findTriggerPosition(event_trigger_position_s *position,
efiAssertVoid(CUSTOM_ERR_6577, !cisnan(angle), "findAngle#2"); efiAssertVoid(CUSTOM_ERR_6577, !cisnan(angle), "findAngle#2");
fixAngle2(angle, "addFuel#2", CUSTOM_ERR_6555, getEngineCycle(operationMode)); fixAngle2(angle, "addFuel#2", CUSTOM_ERR_6555, getEngineCycle(operationMode));
int index = triggerIndexByAngle[(int)angle]; int triggerEventIndex = triggerIndexByAngle[(int)angle];
angle_t eventAngle = eventAngles[index]; angle_t triggerEventAngle = eventAngles[triggerEventIndex];
if (angle < eventAngle) { if (angle < triggerEventAngle) {
warning(CUSTOM_OBD_ANGLE_CONSTRAINT_VIOLATION, "angle constraint violation in findTriggerPosition(): %.2f/%.2f", angle, eventAngle); warning(CUSTOM_OBD_ANGLE_CONSTRAINT_VIOLATION, "angle constraint violation in findTriggerPosition(): %.2f/%.2f", angle, triggerEventAngle);
return; return;
} }
position->eventIndex = index; position->eventIndex = triggerEventIndex;
position->eventAngle = eventAngle; position->eventAngle = triggerEventAngle;
position->angleOffset = angle - eventAngle; position->angleOffset = angle - triggerEventAngle;
} }
void TriggerShape::prepareShape() { void TriggerShape::prepareShape() {