From 842472302482cdded7de720d7f162fbe4bd1550c Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 8 Oct 2019 00:42:47 -0400 Subject: [PATCH] refactoring: better variable names --- .../trigger/decoders/trigger_structure.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 64d14946b9..a330d2c050 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -365,16 +365,16 @@ void TriggerShape::findTriggerPosition(event_trigger_position_s *position, efiAssertVoid(CUSTOM_ERR_6577, !cisnan(angle), "findAngle#2"); fixAngle2(angle, "addFuel#2", CUSTOM_ERR_6555, getEngineCycle(operationMode)); - int index = triggerIndexByAngle[(int)angle]; - angle_t eventAngle = eventAngles[index]; - if (angle < eventAngle) { - warning(CUSTOM_OBD_ANGLE_CONSTRAINT_VIOLATION, "angle constraint violation in findTriggerPosition(): %.2f/%.2f", angle, eventAngle); + int triggerEventIndex = triggerIndexByAngle[(int)angle]; + angle_t triggerEventAngle = eventAngles[triggerEventIndex]; + if (angle < triggerEventAngle) { + warning(CUSTOM_OBD_ANGLE_CONSTRAINT_VIOLATION, "angle constraint violation in findTriggerPosition(): %.2f/%.2f", angle, triggerEventAngle); return; } - position->eventIndex = index; - position->eventAngle = eventAngle; - position->angleOffset = angle - eventAngle; + position->eventIndex = triggerEventIndex; + position->eventAngle = triggerEventAngle; + position->angleOffset = angle - triggerEventAngle; } void TriggerShape::prepareShape() {