Browse Source

Update NtpClientLib and use NTP_TIMEOUT (#452)

pull/685/head
Xose Pérez 6 years ago
parent
commit
d4eb64ca7e
3 changed files with 3 additions and 1 deletions
  1. +1
    -0
      code/espurna/config/general.h
  2. +1
    -0
      code/espurna/ntp.ino
  3. +1
    -1
      code/platformio.ini

+ 1
- 0
code/espurna/config/general.h View File

@ -834,6 +834,7 @@ PROGMEM const char* const custom_reset_string[] = {
#endif
#define NTP_SERVER "pool.ntp.org" // Default NTP server
#define NTP_TIMEOUT 2000 // Set NTP request timeout to 2 seconds (issue #452)
#define NTP_TIME_OFFSET 1 // Default timezone offset (GMT+1)
#define NTP_DAY_LIGHT true // Enable daylight time saving by default
#define NTP_SYNC_INTERVAL 60 // NTP initial check every minute


+ 1
- 0
code/espurna/ntp.ino View File

@ -36,6 +36,7 @@ void _ntpStart() {
NTP.begin(getSetting("ntpServer", NTP_SERVER));
NTP.setInterval(NTP_SYNC_INTERVAL, NTP_UPDATE_INTERVAL);
NTP.setNTPTimeout(NTP_TIMEOUT);
_ntpConfigure();
}


+ 1
- 1
code/platformio.ini View File

@ -27,7 +27,7 @@ lib_deps =
https://github.com/madpilot/mDNSResolver#4cfcda1
https://github.com/xoseperez/my92xx#3.0.1
https://bitbucket.org/xoseperez/nofuss.git#0.2.5
https://github.com/xoseperez/NtpClient.git#b35e249
https://github.com/gmag11/NtpClient.git#10ece38
OneWire
PMS Library
PZEM004T


Loading…
Cancel
Save