Fixed bugs in C tests.

- math.h was not correctly included.
 - the return value of sendCTRLtest sometimes incorrectly reported success.
This commit is contained in:
Jason Watkins
2015-04-06 13:15:48 -07:00
parent 58000ea3dc
commit 9d3e961a2f

View File

@@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#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;
}
}