From c6993dd43011e2aef4306bf7f2105f5cbe2a09ca Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 3 Mar 2017 21:59:00 -0500 Subject: [PATCH] docs & refactoring --- firmware/controllers/trigger/trigger_decoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 5022c911e2..12eec78198 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -248,10 +248,10 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no TRIGGER_SHAPE(size)); } #endif - int endOfCycleIndex = TRIGGER_SHAPE(size) - (delta); + int endOfCycleIndex = TRIGGER_SHAPE(size) - (engineConfiguration->useOnlyRisingEdgeForTrigger ? 2 : 1); - isSynchronizationPoint = !shaft_is_synchronized || (currentCycle.current_index >= endOfCycleIndex; + isSynchronizationPoint = !shaft_is_synchronized || (currentCycle.current_index >= endOfCycleIndex); }