From d338f4e9c94f2b151dc410b92ca3fdac499f5dc6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 25 Aug 2019 01:35:36 -0400 Subject: [PATCH] minor test code fix & refactoring --- firmware/controllers/trigger/trigger_decoder.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index b9c404ac28..001fe3ac58 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -529,14 +529,12 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no */ bool silentTriggerError = triggerShape->getSize() > 40 && CONFIG(silentTriggerError); +#if EFI_UNIT_TEST + actualSynchGap = 1.0 * toothDurations[0] / toothDurations[1]; +#endif /* EFI_UNIT_TEST */ + #if EFI_PROD_CODE if (CONFIG(verboseTriggerSynchDetails) || (someSortOfTriggerError && !silentTriggerError)) { -#else - if (printTriggerDebug) { -#endif /* EFI_PROD_CODE */ - -#if EFI_PROD_CODE - for (int i = 0;i