From 32bff7ffe47f00edb6f1f765929fda3ec66a4688 Mon Sep 17 00:00:00 2001 From: Norman Princen <63923352+NPrincen@users.noreply.github.com> Date: Sat, 18 Apr 2020 12:55:55 -0700 Subject: [PATCH] Changed getPOSI to double posi Also fixed compiler error for timeval struct tv not defined for WIN32. --- C/monitorExample/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C/monitorExample/main.c b/C/monitorExample/main.c index e6d2e62..e0af291 100644 --- a/C/monitorExample/main.c +++ b/C/monitorExample/main.c @@ -26,6 +26,8 @@ #include #include "stdio.h" +struct timeval tv; + #ifdef WIN32 HANDLE hStdIn = NULL; INPUT_RECORD buffer; @@ -51,7 +53,6 @@ int waitForInput() #else int fdstdin = 0; fd_set fds; -struct timeval tv; int waitForInput() { @@ -67,10 +68,10 @@ int main(void) { XPCSocket client = openUDP("127.0.0.1"); const int aircraftNum = 0; - tv.tv_usec = 100 * 1000; + tv.tv_usec = 100 * 1000; while (1) { - float posi[7]; // FIXME: change this to the 64-bit lat/lon/h + double posi[7]; int result = getPOSI(client, posi, aircraftNum); if (result < 0) // Error in getPOSI {