Fix for NTP sync on millis() rollover.

This commit is contained in:
Blaz Kristan 2021-12-29 15:09:33 +01:00
parent 5f73725b8f
commit a9a06a1e4e

View File

@ -120,6 +120,7 @@ void WLED::loop()
if (lastMqttReconnectAttempt > millis()) { if (lastMqttReconnectAttempt > millis()) {
rolloverMillis++; rolloverMillis++;
lastMqttReconnectAttempt = 0; lastMqttReconnectAttempt = 0;
ntpLastSyncTime = 0;
strip.restartRuntime(); strip.restartRuntime();
} }
if (millis() - lastMqttReconnectAttempt > 30000) { if (millis() - lastMqttReconnectAttempt > 30000) {