From 8a94a75975ea776c69238b3fff87da78d0567bba Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Tue, 21 May 2019 20:25:34 +0300 Subject: device: strip CRs. Signed-off-by: Gediminas Jakutis --- src/device/udp.ino | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/device/udp.ino b/src/device/udp.ino index 3074b65..b88f314 100755 --- a/src/device/udp.ino +++ b/src/device/udp.ino @@ -1,25 +1,25 @@ -#include "udp.h" -#include -#include - -static char udppacketbuffer[32] = {0}; -static char *udppacketcursor = NULL; - -void udp_init_packet(IPAddress ip, const int port) -{ - Udp.beginPacket(ip, port); - memset(udppacketbuffer, 0, sizeof(udppacketbuffer)); - udppacketcursor = udppacketbuffer; -} - -void udp_push(const void * const data, const size_t size) -{ - memcpy(udppacketcursor, data, size); - udppacketcursor += size; -} - -int udp_flush(void) -{ - Udp.write((const uint8_t *) udppacketbuffer, udppacketcursor - udppacketbuffer); - return Udp.endPacket(); -} +#include "udp.h" +#include +#include + +static char udppacketbuffer[32] = {0}; +static char *udppacketcursor = NULL; + +void udp_init_packet(IPAddress ip, const int port) +{ + Udp.beginPacket(ip, port); + memset(udppacketbuffer, 0, sizeof(udppacketbuffer)); + udppacketcursor = udppacketbuffer; +} + +void udp_push(const void * const data, const size_t size) +{ + memcpy(udppacketcursor, data, size); + udppacketcursor += size; +} + +int udp_flush(void) +{ + Udp.write((const uint8_t *) udppacketbuffer, udppacketcursor - udppacketbuffer); + return Udp.endPacket(); +} -- cgit v1.2.3