From 06e899e1bbddcdee968e10b3adf24ffcb963074a Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 16 Apr 2022 17:07:57 -0400 Subject: [PATCH] very random progress --- firmware/controllers/algo/engine.h | 2 ++ firmware/controllers/algo/runtime_state.cpp | 2 +- firmware/controllers/trigger/trigger_decoder.cpp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index 5721d4992d..3bd1d5c689 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -329,7 +329,9 @@ public: TpsAccelEnrichment tpsAccelEnrichment; +#if EFI_SHAFT_POSITION_INPUT TriggerCentral triggerCentral; +#endif // EFI_SHAFT_POSITION_INPUT /** * Each individual fuel injection duration for current engine cycle, without wall wetting diff --git a/firmware/controllers/algo/runtime_state.cpp b/firmware/controllers/algo/runtime_state.cpp index 34ab052132..2b697593bc 100644 --- a/firmware/controllers/algo/runtime_state.cpp +++ b/firmware/controllers/algo/runtime_state.cpp @@ -28,7 +28,7 @@ extern uint32_t maxSchedulingPrecisionLoss; extern uint32_t *cyccnt; void resetMaxValues() { -#if EFI_PROD_CODE || EFI_SIMULATOR +#if (EFI_PROD_CODE || EFI_SIMULATOR) && EFI_SHAFT_POSITION_INPUT maxEventCallbackDuration = triggerMaxDuration = 0; #endif /* EFI_PROD_CODE || EFI_SIMULATOR */ diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 06c328a2a6..7719309312 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -99,14 +99,14 @@ void TriggerState::resetCurrentCycleState() { currentCycle.current_index = 0; } +#if EFI_SHAFT_POSITION_INPUT + TriggerStateWithRunningStatistics::TriggerStateWithRunningStatistics() : //https://en.cppreference.com/w/cpp/language/zero_initialization timeOfLastEvent(), instantRpmValue() { } -#if EFI_SHAFT_POSITION_INPUT - #if ! EFI_PROD_CODE bool printTriggerDebug = false; bool printTriggerTrace = false;