red in any case
This commit is contained in:
parent
6010facb07
commit
9e3fa03053
14
src/led.c
14
src/led.c
@ -36,13 +36,11 @@ void ledInit(config_t *pCfg) {
|
||||
|
||||
|
||||
void led (tColor color, bool state) {
|
||||
if (ledsActive) {
|
||||
if (color == E_RED) {
|
||||
digitalWrite(RED_OUT, state ? 1 : 0);
|
||||
} else if (color == E_BLUE) {
|
||||
digitalWrite(BLUE_OUT, state ? 1 : 0);
|
||||
} else if (color == E_GREEN) {
|
||||
digitalWrite(GREEN_OUT, state ? 1 : 0);
|
||||
}
|
||||
if (color == E_RED) {
|
||||
digitalWrite(RED_OUT, state ? 1 : 0);
|
||||
} else if (color == E_BLUE && ledsActive) {
|
||||
digitalWrite(BLUE_OUT, state ? 1 : 0);
|
||||
} else if (color == E_GREEN && ledsActive) {
|
||||
digitalWrite(GREEN_OUT, state ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user