From 436e5a72c39f880055b07d80dfcd4dddfb7b4a42 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 14 Nov 2014 13:05:25 -0600 Subject: [PATCH] auto-sync --- firmware/controllers/algo/engine_configuration.h | 3 ++- firmware/controllers/trigger/trigger_decoder.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration.h b/firmware/controllers/algo/engine_configuration.h index 92c68e08c5..80e01cac5b 100644 --- a/firmware/controllers/algo/engine_configuration.h +++ b/firmware/controllers/algo/engine_configuration.h @@ -182,7 +182,8 @@ typedef struct { int tunerStudioThreadPeriod; int generalPeriodicThreadPeriod; - int tunerStudioSerialSpeed; + short int tunerStudioSerialSpeed; + short int unusedShort; brain_pin_e boardTestModeJumperPin; diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index f28cd1d7eb..805b225c3a 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -50,7 +50,7 @@ bool_t isTriggerDecoderError(void) { return errorDetection.sum(6) > 4; } -static inline bool isSynchronizationGap(TriggerState *shaftPositionState, trigger_shape_s const *triggerShape, +static ALWAYS_INLINE bool isSynchronizationGap(TriggerState *shaftPositionState, trigger_shape_s const *triggerShape, const int currentDuration) { if (!triggerShape->isSynchronizationNeeded) { return false; @@ -72,7 +72,7 @@ static inline bool isSynchronizationGap(TriggerState *shaftPositionState, trigge && currentDuration < shaftPositionState->toothed_previous_duration * triggerShape->syncRatioTo; } -static inline bool noSynchronizationResetNeeded(TriggerState *shaftPositionState, trigger_shape_s const *triggerShape) { +static ALWAYS_INLINE bool noSynchronizationResetNeeded(TriggerState *shaftPositionState, trigger_shape_s const *triggerShape) { if (triggerShape->isSynchronizationNeeded) { return false; }