From b7203cedcc9aa7f691802aae93e8949f1f10f0a2 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 13 Apr 2015 11:10:59 -0500 Subject: [PATCH] auto-sync --- firmware/controllers/trigger/trigger_decoder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index b921961088..9bd5f9ce12 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -55,6 +55,8 @@ float actualSynchGap; static Logging * logger; +efitick_t lastDecodingErrorTime = 0; + /** * @return TRUE is something is wrong with trigger decoding */ @@ -196,6 +198,7 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, uint64_t now triggerDecoderErrorPin.setValue(isDecodingError); if (isDecodingError) { + lastDecodingErrorTime = getTimeNowNt(); totalTriggerErrorCounter++; if (engineConfiguration->isPrintTriggerSynchDetails) { #if EFI_PROD_CODE