From 3d69adb2e29cf62175f0fa14fc17bd13a3595bd2 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 17 Feb 2021 10:18:46 -0500 Subject: [PATCH] https://github.com/andreika-git/hellen-one/issues/3 --- firmware/config/boards/hellen/hellen72/board.mk | 2 +- firmware/console/status_loop.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firmware/config/boards/hellen/hellen72/board.mk b/firmware/config/boards/hellen/hellen72/board.mk index 533f280eb5..c0b3a70bba 100644 --- a/firmware/config/boards/hellen/hellen72/board.mk +++ b/firmware/config/boards/hellen/hellen72/board.mk @@ -19,10 +19,10 @@ endif DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE -# todo: invert 4th LED DDEFS += -DLED_ERROR_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_RUNING_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT +DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT # Add them all together DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen72\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 1167161425..ab43ad9e53 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -111,6 +111,9 @@ extern pin_output_mode_e INVERTED_OUTPUT; #ifndef LED_RUNING_BRAIN_PIN_MODE #define LED_RUNING_BRAIN_PIN_MODE DEFAULT_OUTPUT #endif +#ifndef LED_COMMUNICATION_BRAIN_PIN_MODE +#define LED_COMMUNICATION_BRAIN_PIN_MODE DEFAULT_OUTPUT +#endif int warningEnabled = true; @@ -328,7 +331,7 @@ static OutputPin *leds[] = { &enginePins.warningLedPin, &enginePins.runningLedPi &enginePins.errorLedPin, &enginePins.communicationLedPin, &enginePins.checkEnginePin }; static void initStatusLeds(void) { - enginePins.communicationLedPin.initPin("led: comm status", engineConfiguration->communicationLedPin); + enginePins.communicationLedPin.initPin("led: comm status", engineConfiguration->communicationLedPin, &LED_COMMUNICATION_BRAIN_PIN_MODE); // checkEnginePin is already initialized by the time we get here enginePins.warningLedPin.initPin("led: warning status", engineConfiguration->warningLedPin, &LED_WARNING_BRAIN_PIN_MODE);