diff --git a/statusled.cpp b/statusled.cpp index 8ae3bb1..2052fb3 100644 --- a/statusled.cpp +++ b/statusled.cpp @@ -42,10 +42,9 @@ void StatusLED::tick() { if (pos >= sizeof(animPulse) / 2) pos = 0; } else { // Short pings when reception acquired - analogWrite(CFG_LED_STATUS, 0); - if (pos == 0) digitalWrite(CFG_LED_STATUS, 0); - else digitalWrite(CFG_LED_STATUS, 1); - if (++pos >= 150) pos = 0; + if (pos == 0) analogWrite(CFG_LED_STATUS, GPS::isNight() ? 900 : 1); + else analogWrite(CFG_LED_STATUS, 1023); + if (++pos >= 15) pos = 0; } } diff --git a/statusled.h b/statusled.h index 15828e0..0215676 100644 --- a/statusled.h +++ b/statusled.h @@ -4,6 +4,7 @@ #include "config.h" #include #include +#include "gps.h" class StatusLED { public: