From 5b9017acceea77c5e0dedcc5a67d04662010a4e9 Mon Sep 17 00:00:00 2001
From: burneykb <burneykb@iastate.edu>
Date: Thu, 2 Feb 2017 03:36:22 -0600
Subject: [PATCH] Fixed quadlog_file not being flushed

---
 groundStation/src/backend/backend.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/groundStation/src/backend/backend.c b/groundStation/src/backend/backend.c
index 9fc413c45..5fd676888 100644
--- a/groundStation/src/backend/backend.c
+++ b/groundStation/src/backend/backend.c
@@ -230,8 +230,6 @@ int main(int argc, char **argv)
 	printf("Creating log file '%s'...\n",log_file);
 	quadlog_file = fopen(log_file, "a");
 
-
-
 	// Tell the quad we are ready to send it vrpn data
 	sendStartPacket();
 
@@ -722,6 +720,7 @@ static void quad_recv() {
 		case LOG_ID:
 			/* something like this */
 			fwrite((char *) data, sizeof(char), m.data_len, quadlog_file);
+			fflush(quadlog_file);
 			break;
 		case SETPARAM_ID:
 		case GETPARAM_ID:
-- 
GitLab