diff --git a/firmware/hw_layer/digital_input/trigger/trigger_input.cpp b/firmware/hw_layer/digital_input/trigger/trigger_input.cpp index 0a0276fc4f..84bdc8187b 100644 --- a/firmware/hw_layer/digital_input/trigger/trigger_input.cpp +++ b/firmware/hw_layer/digital_input/trigger/trigger_input.cpp @@ -181,19 +181,20 @@ void startTriggerDebugPins() { } } +#endif /* EFI_SHAFT_POSITION_INPUT */ + void onEcuStartDoSomethingTriggerInputPins() { if (hasFirmwareError()) { return; } -#if EFI_PROD_CODE +#if EFI_PROD_CODE && EFI_SHAFT_POSITION_INPUT if (isBrainPinValid(engineConfiguration->triggerInputPins[0])) { + // todo: we have another 'rpmCalculator.Register' for UNIT_TEST would be great to unify engine->rpmCalculator.Register(); } else { // if we do not have primary input channel maybe it's BCM mode and we inject RPM value via Lua? engine->rpmCalculator.unregister(); } -#endif /* EFI_PROD_CODE */ +#endif /* EFI_PROD_CODE && EFI_SHAFT_POSITION_INPUT */ } - -#endif /* EFI_SHAFT_POSITION_INPUT */ diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index d8e363e8f1..7640d1429a 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -569,8 +569,8 @@ void initHardware() { #if EFI_PROD_CODE && EFI_SHAFT_POSITION_INPUT onEcuStartTriggerImplementation(); - onEcuStartDoSomethingTriggerInputPins(); #endif /* EFI_SHAFT_POSITION_INPUT */ + onEcuStartDoSomethingTriggerInputPins(); #if EFI_HIP_9011 initHip9011();