diff --git a/wled00/ntp.cpp b/wled00/ntp.cpp index 6e57f8cad3..e791d05741 100644 --- a/wled00/ntp.cpp +++ b/wled00/ntp.cpp @@ -8,6 +8,12 @@ static void sendNTPPacket(); static bool checkNTPResponse(); +// Runtime state private to this file - previously WLED_GLOBAL, a leftover from +// when all state lived in one big extern block regardless of who used it. +static byte lastTimerMinute = 0; +static unsigned long ntpPacketSentTime = NTP_NEVER; +static IPAddress ntpServerIP; + // WARNING: may cause errors in sunset calculations on ESP8266, see #3400 // building with `-D WLED_USE_REAL_MATH` will prevent those errors at the expense of flash and RAM diff --git a/wled00/wled.h b/wled00/wled.h index 9bafb49196..182847df3f 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -706,7 +706,7 @@ WLED_GLOBAL bool hueStoreAllowed _INIT(false), hueNewKey _INIT(false); WLED_GLOBAL unsigned long countdownTime _INIT(1514764800L); WLED_GLOBAL bool countdownOverTriggered _INIT(true); -WLED_GLOBAL byte lastTimerMinute _INIT(0); +// lastTimerMinute is private to ntp.cpp - see there. WLED_GLOBAL std::vector timers; WLED_GLOBAL bool doAdvancePlaylist _INIT(false); @@ -755,8 +755,7 @@ WLED_GLOBAL DNSServer dnsServer; WLED_GLOBAL bool ntpConnected _INIT(false); WLED_GLOBAL time_t localTime _INIT(0); WLED_GLOBAL unsigned long ntpLastSyncTime _INIT(NTP_NEVER); -WLED_GLOBAL unsigned long ntpPacketSentTime _INIT(NTP_NEVER); -WLED_GLOBAL IPAddress ntpServerIP; +// ntpPacketSentTime/ntpServerIP are private to ntp.cpp - see there. WLED_GLOBAL uint16_t ntpLocalPort _INIT(2390); WLED_GLOBAL uint16_t rolloverMillis _INIT(0); WLED_GLOBAL float longitude _INIT(WLED_LON);