From 172f054d252eec999d13693c18aee40960f95381 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Sat, 27 Aug 2022 22:09:54 -0400 Subject: [PATCH] separate atomic change (#4494) Co-authored-by: rusefillc --- firmware/controllers/algo/engine.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 5d842539f2..2d1c29124a 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -287,23 +287,21 @@ void Engine::updateSlowSensors() { #endif } -static bool getClutchUpState() { #if EFI_GPIO_HARDWARE +static bool getClutchUpState() { if (isBrainPinValid(engineConfiguration->clutchUpPin)) { return engineConfiguration->clutchUpPinInverted ^ efiReadPin(engineConfiguration->clutchUpPin); } -#endif // EFI_GPIO_HARDWARE return engine->engineState.lua.clutchUpState; } static bool getBrakePedalState() { -#if EFI_GPIO_HARDWARE if (isBrainPinValid(engineConfiguration->brakePedalPin)) { return efiReadPin(engineConfiguration->brakePedalPin); } return engine->engineState.lua.brakePedalState; -#endif // EFI_GPIO_HARDWARE } +#endif // EFI_GPIO_HARDWARE void Engine::updateSwitchInputs() { #if EFI_GPIO_HARDWARE