From 80f38c476ac07de14ef19b48faf7f99c124aaf79 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 10 Jun 2019 17:33:05 -0400 Subject: [PATCH] https://github.com/rusefi/hw_microRusEfi/issues/57 --- firmware/config/boards/microrusefi/!compile-mre.bat | 8 +++++++- firmware/controllers/algo/engine_configuration.cpp | 13 +++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/firmware/config/boards/microrusefi/!compile-mre.bat b/firmware/config/boards/microrusefi/!compile-mre.bat index 4f1cb57b19..a78fbc9fe7 100644 --- a/firmware/config/boards/microrusefi/!compile-mre.bat +++ b/firmware/config/boards/microrusefi/!compile-mre.bat @@ -1,7 +1,13 @@ cd ../../.. -set EXTRA_PARAMS=-DDUMMY +set EXTRA_PARAMS=-DDUMMY ^ + -DEFI_COMMUNICATION_PIN=GPIOE_1 ^ + -DEFI_FATAL_ERROR_PIN=GPIOE_2 ^ + -DEFI_RUNNING_PIN=GPIOE_3 ^ + -DEFI_WARNING_PIN=GPIOE_4 ^ + + call config/boards/common_make.bat diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index a32f99bfbb..4d7222ef6f 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -451,16 +451,25 @@ void setDefaultBasePins(DECLARE_CONFIG_PARAMETER_SIGNATURE) { #ifdef EFI_FATAL_ERROR_PIN engineConfiguration->fatalErrorPin = EFI_FATAL_ERROR_PIN; #else - engineConfiguration->fatalErrorPin = GPIOD_14; + engineConfiguration->fatalErrorPin = GPIOD_14; // red LED on discovery #endif /* EFI_FATAL_ERROR_PIN */ - engineConfiguration->warningLedPin = GPIOD_13; +#ifdef EFI_WARNING_PIN + engineConfiguration->warningLedPin = EFI_WARNING_PIN; +#else + engineConfiguration->warningLedPin = GPIOD_13; // orange LED on discovery +#endif + #ifdef EFI_COMMUNICATION_PIN engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN; #else engineConfiguration->communicationLedPin = GPIOD_15; // blue LED on discovery #endif +#ifdef EFI_RUNNING_PIN + engineConfiguration->runningLedPin = EFI_RUNNING_PIN; +#else engineConfiguration->runningLedPin = GPIOD_12; // green LED on discovery +#endif #if EFI_PROD_CODE // call overrided board-specific serial configuration setup, if needed (for custom boards only)