diff --git a/src/led.cpp b/src/led.cpp index 02ae7afe..56630c41 100644 --- a/src/led.cpp +++ b/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) { @@ -157,7 +157,7 @@ void ledLoop(void *parameter) { // No custom blink, check LoRaWAN state } else { -#if(HAS_LORA) +#if (HAS_LORA) // LED indicators for viusalizing LoRaWAN state if (LMIC.opmode & (OP_JOINING | OP_REJOIN)) { LEDColor = COLOR_YELLOW;