From edb65b660e3ee63a0cb2400a0fdd8c60bc4643d1 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 19 Apr 2022 20:43:41 -0400 Subject: [PATCH] https://github.com/rusefi/alphax-2chan/issues/50 --- firmware/controllers/algo/launch_control.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/firmware/controllers/algo/launch_control.cpp b/firmware/controllers/algo/launch_control.cpp index c0a45647d1..6c07d59eb0 100644 --- a/firmware/controllers/algo/launch_control.cpp +++ b/firmware/controllers/algo/launch_control.cpp @@ -28,8 +28,7 @@ bool LaunchControlBase::isInsideSwitchCondition() { if (isSwitchActivated) { #if !EFI_SIMULATOR if (isBrainPinValid(engineConfiguration->launchActivatePin)) { - //todo: we should take into consideration if this sw is pulled high or low! - launchActivatePinState = efiReadPin(engineConfiguration->launchActivatePin); + launchActivatePinState = engineConfiguration->launchActivateInverted ^ efiReadPin(engineConfiguration->launchActivatePin); } #endif // EFI_PROD_CODE return launchActivatePinState;