We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b135201 commit f6f4468Copy full SHA for f6f4468
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
@@ -81,7 +81,7 @@ unsigned long NTPUtils::getTime(UDP & udp)
81
void NTPUtils::sendNTPpacket(UDP & udp)
82
{
83
uint8_t ntp_packet_buf[NTP_PACKET_SIZE] = {0};
84
85
ntp_packet_buf[0] = 0b11100011;
86
ntp_packet_buf[1] = 0;
87
ntp_packet_buf[2] = 6;
@@ -90,7 +90,7 @@ void NTPUtils::sendNTPpacket(UDP & udp)
90
ntp_packet_buf[13] = 0x4E;
91
ntp_packet_buf[14] = 49;
92
ntp_packet_buf[15] = 52;
93
94
udp.beginPacket(NTP_TIME_SERVER, NTP_TIME_SERVER_PORT);
95
udp.write(ntp_packet_buf, NTP_PACKET_SIZE);
96
udp.endPacket();
0 commit comments