trigger layer start-up is a mess fix #5241
reducing complexity of conditional compilation
This commit is contained in:
parent
8fc2e0eb53
commit
d31ba5f179
|
@ -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 */
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue