From 7698a48fbb0597013548b4481f348809432adfbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 5 Feb 2018 23:18:08 +0100 Subject: [PATCH] Increase the initial check interval for NTP (#452) --- code/espurna/config/general.h | 1 + code/espurna/ntp.ino | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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(); }