From 614a30647d6ad49a467542909eeba0e181ff41c7 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 4 Mar 2017 19:47:15 -0500 Subject: [PATCH] better logging --- firmware/controllers/trigger/trigger_structure.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/controllers/trigger/trigger_structure.cpp b/firmware/controllers/trigger/trigger_structure.cpp index 73beae57e0..c72773acc2 100644 --- a/firmware/controllers/trigger/trigger_structure.cpp +++ b/firmware/controllers/trigger/trigger_structure.cpp @@ -87,6 +87,7 @@ void TriggerShape::calculateTriggerSynchPoint(TriggerState *state DECLARE_ENGINE totalExpected += expectedEventCount[i]; } if (totalExpected < 2) { + // todo: there is a good chance this is not an issue at all and we should allow a 2/1 skipped wheel firmwareError(CUSTOM_ERR_TOO_FEW_EVENTS, "Too few trigger events"); } } @@ -428,6 +429,11 @@ void TriggerShape::setTriggerSynchronizationGap2(float syncRatioFrom, float sync isSynchronizationNeeded = true; this->syncRatioFrom = syncRatioFrom; this->syncRatioTo = syncRatioTo; +#if EFI_UNIT_TEST || defined(__DOXYGEN__) + if (printTriggerDebug) { + printf("setTriggerSynchronizationGap2 %f %f\r\n", syncRatioFrom, syncRatioTo); + } +#endif /* EFI_UNIT_TEST */ } void TriggerShape::setTriggerSynchronizationGap(float syncRatio) {