Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions NTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ void NTPClient::setPoolServerName(const char* poolServerName) {
this->_poolServerName = poolServerName;
}

void NTPClient::setPoolServerIP(IPAddress poolServerIP) {
this->_poolServerIP = poolServerIP;
this->_poolServerName = NULL;
}

void NTPClient::sendNTPPacket() {
// set all bytes in the buffer to 0
memset(this->_packetBuffer, 0, NTP_PACKET_SIZE);
Expand Down
7 changes: 7 additions & 0 deletions NTPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ class NTPClient {
*/
void setPoolServerName(const char* poolServerName);

/**
* Set time server IP
*
* @param poolServerIP
*/
void setPoolServerIP(IPAddress poolServerIP);

/**
* Set random local port
*/
Expand Down