Closed dicson closed 5 years ago
Sorry for the late reply. Will leave this open and investigate soon as I get some time to work on it.
I think you want something like this at the end of updateNTP():
if (queryNTP(_ntp_server, t, measured_at)) {
...
} else {
if ( nowUTC(false) > _last_sync_time + _ntp_interval + NTP_STALE_AFTER ) {
_time_status = timeNeedsSync;
}
UTC.setEvent(updateNTP, nowUTC(false) + NTP_RETRY);
}
Fixed by commit 16539554d790465eececab97040cf6262331b8b8 from #29 (thanks!)
Thank you very much!
Thanks for you work! I think timeNeedsSync status never can be set. I did not find in the code timeNeedsSync and if I disable connection I always see status '2' (timeSet). Maybe I'm wrong. Sorry for my bad english