Added setPoolServer IP

This commit is contained in:
masterx1981 2020-12-28 20:32:49 +01:00
parent d7d8b4512b
commit b5a611a270
2 changed files with 13 additions and 1 deletions

View File

@ -174,7 +174,12 @@ void NTPClient::setUpdateInterval(unsigned long updateInterval) {
} }
void NTPClient::setPoolServerName(const char* poolServerName) { void NTPClient::setPoolServerName(const char* poolServerName) {
this->_poolServerName = poolServerName; this->_poolServerName = poolServerName;
}
void NTPClient::setPoolServerIP(IPAddress poolServerIP) {
this->_poolServerName = NULL;
this->_poolServerIP = poolServerIP;
} }
void NTPClient::sendNTPPacket() { void NTPClient::sendNTPPacket() {

View File

@ -44,6 +44,13 @@ class NTPClient {
*/ */
void setPoolServerName(const char* poolServerName); void setPoolServerName(const char* poolServerName);
/**
* Set time server IP
*
* @param poolServerIP
*/
void setPoolServerIP(IPAddress poolServerIP);
/** /**
* Set random local port * Set random local port
*/ */