Changed code to support Windows libraries and functions as well

This commit is contained in:
2024-02-29 16:38:36 -05:00
parent ddbbc322a6
commit 4b3d5387a1
6 changed files with 55 additions and 30 deletions

View File

@@ -1,9 +1,15 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#ifdef linux
#include <arpa/inet.h>
#endif
#ifdef _WIN32
#include <winsock2.h>
#endif
#include "includes/serialization.h"
/* Takes in float values, casts them to uint16_t and creates a Serial_Data struct */
Serial_Data Serial_create_data(float pad_x, float pad_y, float ball_x, float ball_y) {
Serial_Data data;