From dca11bb486a431e8f6c7afd222a030f51fd99117 Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 23 Oct 2018 03:47:30 -0400 Subject: [PATCH] fixing popular typo --- firmware/controllers/trigger/trigger_decoder.cpp | 8 ++++---- firmware/controllers/trigger/trigger_decoder.h | 2 +- firmware/controllers/trigger/trigger_structure.cpp | 2 +- firmware/controllers/trigger/trigger_structure.h | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 6357dbfc37..6f5cd3bb41 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -260,9 +260,9 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no #endif /* EFI_UNIT_TEST */ } - bool isGapCondition[GAP_TRACKING_LENGHT]; + bool isGapCondition[GAP_TRACKING_LENGTH]; - for (int i = 0;i toothDurations[i + 1] * TRIGGER_SHAPE(syncronizationRatioFrom[i]) && toothDurations[i] < toothDurations[i + 1] * TRIGGER_SHAPE(syncronizationRatioTo[i])); } @@ -293,7 +293,7 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no TRIGGER_SHAPE(syncronizationRatioFrom[2]), TRIGGER_SHAPE(syncronizationRatioTo[2]), someSortOfTriggerError); - for (int i = 0;i 0; i--) { + for (int i = GAP_TRACKING_LENGTH; i > 0; i--) { toothDurations[i] = toothDurations[i - 1]; } diff --git a/firmware/controllers/trigger/trigger_decoder.h b/firmware/controllers/trigger/trigger_decoder.h index ddabbdb310..4d304099a2 100644 --- a/firmware/controllers/trigger/trigger_decoder.h +++ b/firmware/controllers/trigger/trigger_decoder.h @@ -77,7 +77,7 @@ public: /** * current duration at index zero and previous durations are following */ - uint32_t toothDurations[GAP_TRACKING_LENGHT + 1]; + uint32_t toothDurations[GAP_TRACKING_LENGTH + 1]; efitime_t toothed_previous_time; diff --git a/firmware/controllers/trigger/trigger_structure.cpp b/firmware/controllers/trigger/trigger_structure.cpp index 7cc38e299a..bdc5d9f3d2 100644 --- a/firmware/controllers/trigger/trigger_structure.cpp +++ b/firmware/controllers/trigger/trigger_structure.cpp @@ -105,7 +105,7 @@ void TriggerShape::initialize(operation_mode_e operationMode, bool needSecondTri // memset(triggerIndexByAngle, 0, sizeof(triggerIndexByAngle)); setTriggerSynchronizationGap(2); - for (int index = 1; index < GAP_TRACKING_LENGHT ; index++) { + for (int index = 1; index < GAP_TRACKING_LENGTH ; index++) { // NaN means do not use this gap ratio setTriggerSynchronizationGap3(index, NAN, 100000); } diff --git a/firmware/controllers/trigger/trigger_structure.h b/firmware/controllers/trigger/trigger_structure.h index 167407710e..e0e62e557f 100644 --- a/firmware/controllers/trigger/trigger_structure.h +++ b/firmware/controllers/trigger/trigger_structure.h @@ -45,7 +45,7 @@ private: class Engine; class TriggerState; -#define GAP_TRACKING_LENGHT 4 +#define GAP_TRACKING_LENGTH 4 /** * @brief Trigger shape has all the fields needed to describe and decode trigger signal. @@ -99,8 +99,8 @@ public: * gaps ratios to sync */ - float syncronizationRatioFrom[GAP_TRACKING_LENGHT]; - float syncronizationRatioTo[GAP_TRACKING_LENGHT]; + float syncronizationRatioFrom[GAP_TRACKING_LENGTH]; + float syncronizationRatioTo[GAP_TRACKING_LENGTH]; /**