Skip to content

Commit

Permalink
NTPUtils: fix whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Jun 20, 2024
1 parent 8b6ff40 commit b3f2282
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utility/time/NTPUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ unsigned long NTPUtils::getTime(UDP & udp)
udp.stop();
return 0;
}

uint8_t ntp_packet_buf[NTP_PACKET_SIZE];
udp.read(ntp_packet_buf, NTP_PACKET_SIZE);
udp.stop();
Expand All @@ -75,7 +75,7 @@ unsigned long NTPUtils::getTime(UDP & udp)
void NTPUtils::sendNTPpacket(UDP & udp)
{
uint8_t ntp_packet_buf[NTP_PACKET_SIZE] = {0};

ntp_packet_buf[0] = 0b11100011;
ntp_packet_buf[1] = 0;
ntp_packet_buf[2] = 6;
Expand All @@ -84,7 +84,7 @@ void NTPUtils::sendNTPpacket(UDP & udp)
ntp_packet_buf[13] = 0x4E;
ntp_packet_buf[14] = 49;
ntp_packet_buf[15] = 52;

udp.beginPacket(NTP_TIME_SERVER, NTP_TIME_SERVER_PORT);
udp.write(ntp_packet_buf, NTP_PACKET_SIZE);
udp.endPacket();
Expand Down

0 comments on commit b3f2282

Please sign in to comment.