From 931c47169776418cc499e5195f60f6a8f18bee64 Mon Sep 17 00:00:00 2001 From: sheffieldnick Date: Wed, 26 Apr 2017 15:14:37 +0100 Subject: [PATCH] Added support for server IPAddress argument to NTPClient --- NTPClient.cpp | 8 +++++++- NTPClient.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) mode change 100644 => 100755 NTPClient.cpp mode change 100644 => 100755 NTPClient.h diff --git a/NTPClient.cpp b/NTPClient.cpp old mode 100644 new mode 100755 index 6133508..f2d484f --- a/NTPClient.cpp +++ b/NTPClient.cpp @@ -35,7 +35,13 @@ NTPClient::NTPClient(UDP& udp, const char* poolServerName) { this->_poolServerName = poolServerName; } -NTPClient::NTPClient(UDP& udp, const char* poolServerName, long timeOffset) { +NTPClient::NTPClient(UDP& udp, IPAddress poolServerIP) { + this->_udp = &udp; + this->_poolServerIP = poolServerIP; + this->_poolServerName = NULL; +} + +NTPClient::NTPClient(UDP& udp, const char* poolServerName, int timeOffset) { this->_udp = &udp; this->_timeOffset = timeOffset; this->_poolServerName = poolServerName; diff --git a/NTPClient.h b/NTPClient.h old mode 100644 new mode 100755 index 02d8752..08c6ee1 --- a/NTPClient.h +++ b/NTPClient.h @@ -30,6 +30,7 @@ class NTPClient { NTPClient(UDP& udp); NTPClient(UDP& udp, long timeOffset); NTPClient(UDP& udp, const char* poolServerName); + NTPClient(UDP& udp, IPAddress poolServerIP); NTPClient(UDP& udp, const char* poolServerName, long timeOffset); NTPClient(UDP& udp, const char* poolServerName, long timeOffset, unsigned long updateInterval);