From bef15f8e1b20aff978b71866b501a4da85881434 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 6 May 2024 15:01:11 -0400 Subject: board v1.7 --- src/main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 5db59d4..69edfd3 100644 --- a/src/main.c +++ b/src/main.c @@ -3,8 +3,10 @@ #include #include #include +#include #include +#include #include @@ -14,10 +16,20 @@ volatile double humidity = 0; int _sock_connect(void *data) { int fd = (uintptr_t)data; + + OSMInitFrame frame = {0}; + memcpy(frame.magic, OSM_MAGIC_INIT, 4); + frame.keylen = 0; + + write(fd, &frame, sizeof(frame)); + printf("Wrote 1!\n"); double temp = temperature; write(fd, &temp, sizeof(temp)); + printf("Wrote 2!\n"); close(fd); + + printf("Wrote!\n"); return 0; } -- cgit v1.2.3