diff --git a/platformio.ini b/platformio.ini index e3217138..8be3a272 100644 --- a/platformio.ini +++ b/platformio.ini @@ -11,10 +11,10 @@ ; ---> SELECT TARGET PLATFORM HERE! <--- [platformio] -;env_default = heltec_wifi_lora_32 +env_default = heltec_wifi_lora_32 ;env_default = ttgov1 ;env_default = ttgov2 -env_default = lopy +;env_default = lopy ;env_default = lopy4 ;env_default = lolin32lite_lora ;env_default = lolin32_lora diff --git a/src/main.cpp b/src/main.cpp index f45403e9..73b6b343 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -424,11 +424,9 @@ uint64_t uptime() { #endif #ifdef HAS_RGB_LED - if (LEDState) - rgb_set_color(color); // LED on - else - rgb_set_color(COLOR_NONE); // LED off + rgb_set_color(LEDState ? color : COLOR_NONE); #endif + previousLEDState = LEDState; LEDcount--; // decrement blink counter }