We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b6ff40 commit b3f2282Copy full SHA for b3f2282
src/utility/time/NTPUtils.cpp
@@ -54,7 +54,7 @@ unsigned long NTPUtils::getTime(UDP & udp)
54
udp.stop();
55
return 0;
56
}
57
-
+
58
uint8_t ntp_packet_buf[NTP_PACKET_SIZE];
59
udp.read(ntp_packet_buf, NTP_PACKET_SIZE);
60
@@ -75,7 +75,7 @@ unsigned long NTPUtils::getTime(UDP & udp)
75
void NTPUtils::sendNTPpacket(UDP & udp)
76
{
77
uint8_t ntp_packet_buf[NTP_PACKET_SIZE] = {0};
78
79
ntp_packet_buf[0] = 0b11100011;
80
ntp_packet_buf[1] = 0;
81
ntp_packet_buf[2] = 6;
@@ -84,7 +84,7 @@ void NTPUtils::sendNTPpacket(UDP & udp)
84
ntp_packet_buf[13] = 0x4E;
85
ntp_packet_buf[14] = 49;
86
ntp_packet_buf[15] = 52;
87
88
udp.beginPacket(NTP_TIME_SERVER, NTP_TIME_SERVER_PORT);
89
udp.write(ntp_packet_buf, NTP_PACKET_SIZE);
90
udp.endPacket();
0 commit comments