From dae865210a19cb6a679a339157f73645dc9795ac Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 19 Apr 2023 17:21:23 -0400 Subject: [PATCH] trigger layer start-up is a mess #5241 reducing the mess: reducing code duplication --- firmware/hw_layer/digital_input/trigger/trigger_input.cpp | 1 - firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp | 2 -- firmware/hw_layer/hardware.cpp | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/firmware/hw_layer/digital_input/trigger/trigger_input.cpp b/firmware/hw_layer/digital_input/trigger/trigger_input.cpp index 42b5d7e72d..2318efd449 100644 --- a/firmware/hw_layer/digital_input/trigger/trigger_input.cpp +++ b/firmware/hw_layer/digital_input/trigger/trigger_input.cpp @@ -158,7 +158,6 @@ void startTriggerInputPins() { } void onEcuStartTriggerImplementation() { - onEcuStartDoSomethingTriggerInputPins(); } #endif /* (HAL_TRIGGER_USE_PAL == TRUE) || (HAL_TRIGGER_USE_ADC == TRUE) */ diff --git a/firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp b/firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp index c9fdfec0f5..ccef2388cd 100644 --- a/firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp +++ b/firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp @@ -90,8 +90,6 @@ static bool isCompEnabled = false; void onEcuStartTriggerImplementation() { compInit(); compStart(EFI_COMP_PRIMARY_DEVICE, &comp_shaft_cfg); - - onEcuStartDoSomethingTriggerInputPins(); } static int getDacValue(uint8_t voltage) { diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index ac387357d1..749ff0a35b 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -570,6 +570,7 @@ void initHardware() { #if EFI_PROD_CODE && EFI_SHAFT_POSITION_INPUT onEcuStartTriggerImplementation(); + onEcuStartDoSomethingTriggerInputPins(); #endif /* EFI_SHAFT_POSITION_INPUT */ #if EFI_HIP_9011