From 8327b23f3b65900f0a2dc6b6dc8ef1ad23742185 Mon Sep 17 00:00:00 2001 From: Christophe Catherine Slychan Date: Sun, 26 Apr 2020 23:36:44 +0200 Subject: [PATCH] add setPoolServerIP and setPoolServerAddress methods --- NTPClient.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NTPClient.cpp b/NTPClient.cpp index fffe105..e052951 100755 --- a/NTPClient.cpp +++ b/NTPClient.cpp @@ -177,6 +177,20 @@ void NTPClient::setPoolServerName(const char* poolServerName) { this->_poolServerName = poolServerName; } +void NTPClient::setPoolServerIP(IPAddress poolServerIP) { + this->_poolServerIP = poolServerIP; + this->_poolServerName = NULL; +} + +void NTPClient::setPoolServerAddress(const char* poolServerAddress) { + this->_poolServerName = poolServerAddress; +} + +void NTPClient::setPoolServerAddress(IPAddress poolServerAddress) { + this->_poolServerIP = poolServerAddress; + this->_poolServerName = NULL; +} + void NTPClient::sendNTPPacket() { // set all bytes in the buffer to 0 memset(this->_packetBuffer, 0, NTP_PACKET_SIZE);