From 9d3e961a2f33bd9b58cb7bf73965beeac3b71063 Mon Sep 17 00:00:00 2001 From: Jason Watkins Date: Mon, 6 Apr 2015 13:15:48 -0700 Subject: [PATCH] Fixed bugs in C tests. - math.h was not correctly included. - the return value of sendCTRLtest sometimes incorrectly reported success. --- TestScripts/C Tests/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TestScripts/C Tests/main.c b/TestScripts/C Tests/main.c index 04f7037..0a536bb 100644 --- a/TestScripts/C Tests/main.c +++ b/TestScripts/C Tests/main.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "xplaneconnect.h" int testFailed = 0; @@ -281,7 +282,7 @@ short sendCTRLTest() // sendCTRL test { if (fabs(recDATA[i][0]-CTRL[i])>1e-4) { - return -i; + return -i - 1; } }