fix rgb led init
This commit is contained in:
parent
b2c054f187
commit
c55b7e8709
12
src/main.cpp
12
src/main.cpp
@ -201,26 +201,26 @@ void setup() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// initialize leds
|
// initialize leds
|
||||||
|
#ifdef HAS_RGB_LED
|
||||||
|
rgb_led_init();
|
||||||
|
strcat_P(features, " RGB");
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (HAS_LED != NOT_A_PIN)
|
#if (HAS_LED != NOT_A_PIN)
|
||||||
pinMode(HAS_LED, OUTPUT);
|
pinMode(HAS_LED, OUTPUT);
|
||||||
strcat_P(features, " LED");
|
strcat_P(features, " LED");
|
||||||
|
|
||||||
#ifdef LED_POWER_SW
|
#ifdef LED_POWER_SW
|
||||||
pinMode(LED_POWER_SW, OUTPUT);
|
pinMode(LED_POWER_SW, OUTPUT);
|
||||||
digitalWrite(LED_POWER_SW, LED_POWER_ON);
|
digitalWrite(LED_POWER_SW, LED_POWER_ON);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAS_TWO_LED
|
#ifdef HAS_TWO_LED
|
||||||
pinMode(HAS_TWO_LED, OUTPUT);
|
pinMode(HAS_TWO_LED, OUTPUT);
|
||||||
strcat_P(features, " LED2");
|
strcat_P(features, " LED2");
|
||||||
#endif
|
#endif
|
||||||
|
// use simple LED for power display if we have additional RGB LED, else for status
|
||||||
// use LED for power display if we have additional RGB LED, else for status
|
|
||||||
#ifdef HAS_RGB_LED
|
#ifdef HAS_RGB_LED
|
||||||
switch_LED(LED_ON);
|
switch_LED(LED_ON);
|
||||||
strcat_P(features, " RGB");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAS_LED
|
#endif // HAS_LED
|
||||||
|
|
||||||
#if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED)
|
#if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED)
|
||||||
|
Loading…
Reference in New Issue
Block a user