From 9f339e5eb453dca732f17db7be889eef0ca465e2 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 4 Mar 2017 08:35:22 -0500 Subject: [PATCH] better error message --- firmware/controllers/trigger/trigger_simulator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/trigger/trigger_simulator.cpp b/firmware/controllers/trigger/trigger_simulator.cpp index 7d937ffbd2..5f5f084b73 100644 --- a/firmware/controllers/trigger/trigger_simulator.cpp +++ b/firmware/controllers/trigger/trigger_simulator.cpp @@ -71,8 +71,9 @@ void TriggerStimulatorHelper::assertSyncPositionAndSetDutyCycle(uint32_t index, for (uint32_t i = startIndex; i <= index + 2 * shape->getSize(); i++) { nextStep(state, shape, i, triggerConfig PASS_ENGINE_PARAMETER); } - if (state->getTotalRevolutionCounter() != 3) { - warning(CUSTOM_OBD_TRIGGER_SHAPE, "sync failed/wrong gap parameters trigger=%s", getTrigger_type_e(engineConfiguration->trigger.type)); + int revolutionCounter = state->getTotalRevolutionCounter(); + if (revolutionCounter != 3) { + warning(CUSTOM_OBD_TRIGGER_SHAPE, "sync failed/wrong gap parameters trigger=%s rc=%d", getTrigger_type_e(engineConfiguration->trigger.type), revolutionCounter); shape->shapeDefinitionError = true; return; }