From 31ed18fe84c650d53ed106ca2960518d769439db Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 15 Dec 2021 19:20:07 -0500 Subject: [PATCH] clutch input via CAN #3605 --- firmware/controllers/algo/engine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 3d7c45245d..41ce7b831e 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -313,17 +313,21 @@ void Engine::updateSlowSensors() { } static bool getClutchUpState() { +#if EFI_GPIO_HARDWARE if (isBrainPinValid(engineConfiguration->clutchUpPin)) { return engineConfiguration->clutchUpPinInverted ^ efiReadPin(engineConfiguration->clutchUpPin); } +#endif // EFI_GPIO_HARDWARE return engine->engineState.luaAdjustments.clutchUpState; } static bool getBrakePedalState() { +#if EFI_GPIO_HARDWARE if (isBrainPinValid(engineConfiguration->throttlePedalUpPin)) { return efiReadPin(engineConfiguration->brakePedalPin); } return engine->engineState.luaAdjustments.brakePedalState; +#endif // EFI_GPIO_HARDWARE } void Engine::updateSwitchInputs() {