diff --git a/main/User_config.h b/main/User_config.h index d5142b1..e038800 100644 --- a/main/User_config.h +++ b/main/User_config.h @@ -388,6 +388,7 @@ int lowpowermode = DEFAULT_LOW_POWER_MODE; # define ota_timeout_millis 30000 #endif +/*-------------ERRORS, INFOS, SEND RECEIVE Display through LED----------------*/ #ifndef RGB_INDICATORS // Management of Errors, reception/emission and informations indicators with basic LED /*-------------DEFINE PINs FOR STATUS LEDs----------------*/ # ifndef LED_SEND_RECEIVE @@ -449,9 +450,14 @@ int lowpowermode = DEFAULT_LOW_POWER_MODE; #else // Management of Errors, reception/emission and informations indicators with RGB LED # include CRGB leds[FASTLED_IND_NUM_LEDS]; +# ifndef RGB_LED_POWER +# define RGB_LED_POWER -1 // If the RGB Led is linked to GPIO pin for power define it here +# endif # define SetupIndicators() \ + pinMode(RGB_LED_POWER, OUTPUT); \ + digitalWrite(RGB_LED_POWER, HIGH); \ FastLED.addLeds(leds, FASTLED_IND_NUM_LEDS); \ - FastLED.setBrightness(20); /* Error, warning and infos display management*/ + FastLED.setBrightness(20); # define ErrorIndicatorON() \ leds[0] = CRGB::Red; \ FastLED.show()