Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions wled00/ntp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Timer> timers;
WLED_GLOBAL bool doAdvancePlaylist _INIT(false);

Expand Down Expand Up @@ -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);
Expand Down
Loading