From c48c65cad172ae4dee1993aa29cf168af8f107d7 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 17 Dec 2021 16:33:43 -0500 Subject: [PATCH] https://github.com/rusefi/hellen154hyundai/issues/49 --- .../boards/hellen/hellen154hyundai/board_configuration.cpp | 4 ++++ firmware/controllers/algo/engine.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/config/boards/hellen/hellen154hyundai/board_configuration.cpp b/firmware/config/boards/hellen/hellen154hyundai/board_configuration.cpp index 2851e3d833..88e949b724 100644 --- a/firmware/config/boards/hellen/hellen154hyundai/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen154hyundai/board_configuration.cpp @@ -143,6 +143,10 @@ void setBoardDefaultConfiguration(void) { engineConfiguration->mainRelayPin = GPIOG_14; // pin: 111a, OUT_IO3 engineConfiguration->malfunctionIndicatorPin = H144_OUT_PWM8; + engineConfiguration->brakePedalPin = H144_IN_RES3; + engineConfiguration->clutchUpPin = H144_IN_RES2; + engineConfiguration->acSwitch = H144_IN_RES1; + // "required" hardware is done - set some reasonable defaults setupDefaultSensorInputs(); diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 3fa5464361..d8f03d0b15 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -321,7 +321,7 @@ static bool getClutchUpState() { static bool getBrakePedalState() { #if EFI_GPIO_HARDWARE - if (isBrainPinValid(engineConfiguration->throttlePedalUpPin)) { + if (isBrainPinValid(engineConfiguration->brakePedalPin)) { return efiReadPin(engineConfiguration->brakePedalPin); } return engine->engineState.luaAdjustments.brakePedalState;