NTPClient has now a method boolean isTimeValid() which indicates whether the last update was successful or not. Clock will blink if it wasn't successful.

This commit is contained in:
2019-05-30 11:36:13 +02:00
parent 0d3896ca0d
commit adb03d486b
3 changed files with 15 additions and 2 deletions

View File

@ -26,6 +26,8 @@ class NTPClient {
void sendNTPPacket();
boolean _timeValid = false;
public:
NTPClient(UDP& udp);
NTPClient(UDP& udp, long timeOffset);
@ -69,6 +71,7 @@ class NTPClient {
int getHours() const;
int getMinutes() const;
int getSeconds() const;
boolean getTimeValid() const;
/**
* Changes the time offset. Useful for changing timezones dynamically