Browse Source

Increase the initial check interval for NTP (#452)

softuart
Xose Pérez 6 years ago
parent
commit
7698a48fbb
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      code/espurna/config/general.h
  2. +1
    -1
      code/espurna/ntp.ino

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

@ -775,6 +775,7 @@ PROGMEM const char* const custom_reset_string[] = {
#define NTP_SERVER "pool.ntp.org" // Default NTP server #define NTP_SERVER "pool.ntp.org" // Default NTP server
#define NTP_TIME_OFFSET 1 // Default timezone offset (GMT+1) #define NTP_TIME_OFFSET 1 // Default timezone offset (GMT+1)
#define NTP_DAY_LIGHT true // Enable daylight time saving by default #define NTP_DAY_LIGHT true // Enable daylight time saving by default
#define NTP_SYNC_INTERVAL 60 // NTP initial check every minute
#define NTP_UPDATE_INTERVAL 1800 // NTP check every 30 minutes #define NTP_UPDATE_INTERVAL 1800 // NTP check every 30 minutes
#define NTP_START_DELAY 1000 // Delay NTP start 1 second #define NTP_START_DELAY 1000 // Delay NTP start 1 second


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

@ -35,7 +35,7 @@ void _ntpStart() {
_ntp_start = 0; _ntp_start = 0;
NTP.begin(getSetting("ntpServer", NTP_SERVER)); NTP.begin(getSetting("ntpServer", NTP_SERVER));
NTP.setInterval(NTP_UPDATE_INTERVAL);
NTP.setInterval(NTP_SYNC_INTERVAL, NTP_UPDATE_INTERVAL);
_ntpConfigure(); _ntpConfigure();
} }


Loading…
Cancel
Save