diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index d376a2d4..f032e5f7 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -775,6 +775,7 @@ PROGMEM const char* const custom_reset_string[] = { #define NTP_SERVER "pool.ntp.org" // Default NTP server #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 #define NTP_UPDATE_INTERVAL 1800 // NTP check every 30 minutes #define NTP_START_DELAY 1000 // Delay NTP start 1 second diff --git a/code/espurna/ntp.ino b/code/espurna/ntp.ino index a87c75e8..37ea59fd 100644 --- a/code/espurna/ntp.ino +++ b/code/espurna/ntp.ino @@ -35,7 +35,7 @@ void _ntpStart() { _ntp_start = 0; NTP.begin(getSetting("ntpServer", NTP_SERVER)); - NTP.setInterval(NTP_UPDATE_INTERVAL); + NTP.setInterval(NTP_SYNC_INTERVAL, NTP_UPDATE_INTERVAL); _ntpConfigure(); }