OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Can multiple NTP servers be configured and used? › Reply To: Can multiple NTP servers be configured and used?
Paul
@ Ray
I have a question..
Looking at source code online from this link: https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/opensprinkler_server.cpp#L2146
I see the following in the code:
uint16_t port = (uint16_t)(os.iopts[IOPT_HTTPPORT_1]<<8) + (uint16_t)os.iopts[IOPT_HTTPPORT_0];
port = (port==8000) ? 8888:8000; // use a different port than http port
UDP *udp = new EthernetUDP();
#define NTP_PACKET_SIZE 48
#define NTP_PORT 123
#define N_PUBLIC_SERVERS 5
static const char* public_ntp_servers[] = {
“time.google.com”,
“time.nist.gov”,
“time.windows.com”,
“time.cloudflare.com”,
“pool.ntp.org” };
static uint8_t sidx = 0;
static byte packetBuffer[NTP_PACKET_SIZE];
byte ntpip[4] = {
os.iopts[IOPT_NTP_IP1],
os.iopts[IOPT_NTP_IP2],
os.iopts[IOPT_NTP_IP3],
os.iopts[IOPT_NTP_IP4]};
Just wondering does this mean IF i DO NOT set up a static specific IP within the config, the firmware will by defualt cycle through the online sources listed?