Cleaned up CTRL functions.

- Removed parseCTRL and readCTRL.
 - Tweaked variable type, order and naming.
 - Improved validation and error reporting.
 - Updated Interface Control Document to reflect adition of aircraft number to CTRL command.
This commit is contained in:
Jason Watkins
2015-04-16 09:54:48 -07:00
parent 0e6195c063
commit 6ac20f0998
3 changed files with 50 additions and 104 deletions

View File

@@ -56,17 +56,6 @@ typedef struct
#endif
} XPCSocket;
typedef struct
{
float pitch;
float roll;
float yaw;
float throttle;
char gear;
float flaps;
char aircraft;
} xpcCtrl;
typedef struct
{
double latitude;
@@ -112,10 +101,8 @@ int psendPOSI(XPCSocket sock, float values[], int size);
int sendPOSI(XPCSocket sock, float values[], int size, char ac);
// Controls
xpcCtrl parseCTRL(const char data[]);
xpcCtrl readCTRL(XPCSocket recfd);
short sendCTRL(XPCSocket recfd, short numArgs, float valueArray[]);
short sendpCTRL(XPCSocket recfd, short numArgs, float valueArray[], char acNum);
int psendCTRL(XPCSocket sock, float values[], int size);
int sendCTRL(XPCSocket sock, float values[], int size, char ac);
// Waypoints
xpcWypt parseWYPT(const char data[]);