led.cpp: bugfix 2nd LED
This commit is contained in:
parent
e18f9fdcae
commit
0dcb9b9e2b
12
src/led.cpp
12
src/led.cpp
@ -108,23 +108,23 @@ void switch_LED(uint8_t state) {
|
||||
}
|
||||
|
||||
void switch_LED1(uint8_t state) {
|
||||
#if (HAS_LED1 != NOT_A_PIN)
|
||||
#ifdef HAS_TWO_LED
|
||||
if (state == LED_ON) {
|
||||
// switch LED on
|
||||
#ifdef LED1_ACTIVE_LOW
|
||||
digitalWrite(HAS_LED1, LOW);
|
||||
digitalWrite(HAS_TWO_LED, LOW);
|
||||
#else
|
||||
digitalWrite(HAS_LED1, HIGH);
|
||||
digitalWrite(HAS_TWO_LED, HIGH);
|
||||
#endif
|
||||
} else if (state == LED_OFF) {
|
||||
// switch LED off
|
||||
#ifdef LED1_ACTIVE_LOW
|
||||
digitalWrite(HAS_LED1, HIGH);
|
||||
digitalWrite(HAS_TWO_LED, HIGH);
|
||||
#else
|
||||
digitalWrite(HAS_LED1, LOW);
|
||||
digitalWrite(HAS_TWO_LED, LOW);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif // HAS_TWO_LED
|
||||
}
|
||||
|
||||
void blink_LED(uint16_t set_color, uint16_t set_blinkduration) {
|
||||
|
Loading…
Reference in New Issue
Block a user