From 3b2e697158faf9f01dea044c1230219894e23c3f Mon Sep 17 00:00:00 2001 From: Jason Watkins Date: Wed, 29 Apr 2015 08:14:55 -0700 Subject: [PATCH] Removed 'p' variants of the sendCTRL and sendPOSI functions from the C client. --- C/src/xplaneConnect.c | 10 ---------- C/src/xplaneConnect.h | 20 -------------------- TestScripts/C Tests/main.c | 12 ++++++------ 3 files changed, 6 insertions(+), 36 deletions(-) diff --git a/C/src/xplaneConnect.c b/C/src/xplaneConnect.c index ec44366..c742df5 100755 --- a/C/src/xplaneConnect.c +++ b/C/src/xplaneConnect.c @@ -514,11 +514,6 @@ int getDREFs(XPCSocket sock, const char* drefs[], float* values[], unsigned char /*****************************************************************************/ /**** POSI functions ****/ /*****************************************************************************/ -int psendPOSI(XPCSocket sock, float values[], int size) -{ - return sendPOSI(sock, values, size, 0); -} - int sendPOSI(XPCSocket sock, float values[], int size, char ac) { // Validate input @@ -563,11 +558,6 @@ int sendPOSI(XPCSocket sock, float values[], int size, char ac) /*****************************************************************************/ /**** CTRL functions ****/ /*****************************************************************************/ -int psendCTRL(XPCSocket sock, float values[], int size) -{ - return sendCTRL(sock, values, size, 0); -} - int sendCTRL(XPCSocket sock, float values[], int size, char ac) { // Validate input diff --git a/C/src/xplaneConnect.h b/C/src/xplaneConnect.h index 8b38193..787881f 100644 --- a/C/src/xplaneConnect.h +++ b/C/src/xplaneConnect.h @@ -166,16 +166,6 @@ int getDREFs(XPCSocket sock, const char* drefs[], float* values[], unsigned char // Position -/// Sets the position and orientation of the player aircraft. -/// -/// \param sock The socket to use to send the command. -/// \param values An array representing position data about the aircraft. The format of values is -/// [Lat, Lon, Alt, Pitch, Roll, Yaw, Gear]. If less than 7 values are specified, -/// the unspecified values will be left unchanged. -/// \param size The number of elements in values. -/// \returns 0 if successful, otherwise a negative value. -int psendPOSI(XPCSocket sock, float values[], int size); - /// Sets the position and orientation of the specified aircraft. /// /// \param sock The socket to use to send the command. @@ -189,16 +179,6 @@ int sendPOSI(XPCSocket sock, float values[], int size, char ac); // Controls -/// Sets the control surfaces of the player aircraft. -/// -/// \param sock The socket to use to send the command. -/// \param values An array representing position data about the aircraft. The format of values is -/// [Elevator, Aileron, Rudder, Throttle, Gear, Flaps]. If less than 6 values are -/// specified, the unspecified values will be left unchanged. -/// \param size The number of elements in values. -/// \returns 0 if successful, otherwise a negative value. -int psendCTRL(XPCSocket sock, float values[], int size); - /// Sets the control surfaces of the specified aircraft. /// /// \param sock The socket to use to send the command. diff --git a/TestScripts/C Tests/main.c b/TestScripts/C Tests/main.c index 85da1e5..65401dd 100644 --- a/TestScripts/C Tests/main.c +++ b/TestScripts/C Tests/main.c @@ -379,7 +379,7 @@ int psendCTRLTest() // sendCTRL test // Execute 1 // 0 pitch, roll, yaw - psendCTRL(sock, CTRL, 3); + sendCTRL(sock, CTRL, 3, 0); int result = getDREFs(sock, drefs, data, 6, sizes); // Close socket @@ -404,7 +404,7 @@ int psendCTRLTest() // sendCTRL test CTRL[0] = 0.2F; CTRL[1] = 0.1F; CTRL[2] = 0.1F; - psendCTRL(sock, CTRL, 6); + sendCTRL(sock, CTRL, 6, 0); int result = getDREFs(sock, drefs, data, 6, sizes); // Close socket @@ -429,7 +429,7 @@ int psendCTRLTest() // sendCTRL test CTRL[0] = -998.0F; CTRL[1] = -998.0F; CTRL[2] = -998.0F; - psendCTRL(sock, CTRL, 6); + sendCTRL(sock, CTRL, 6, 0); int result = getDREFs(sock, drefs, data, 6, sizes); // Close socket @@ -577,7 +577,7 @@ int psendPOSITest() // sendPOSI test // Execution 1 pauseSim(sock, 1); - psendPOSI(sock, POSI, 7); + sendPOSI(sock, POSI, 7, 0); int result = getDREFs(sock, drefs, data, 7, sizes); pauseSim(sock, 0); @@ -611,7 +611,7 @@ int psendPOSITest() // sendPOSI test pauseSim(sock, 1); float loc[3]; getDREFs(sock, drefs, loc, 3, sizes); - psendPOSI(sock, POSI, 7); + sendPOSI(sock, POSI, 7, 0); int result = getDREFs(sock, drefs, data, 7, sizes); pauseSim(sock, 0); @@ -654,7 +654,7 @@ int psendPOSITest() // sendPOSI test // Execution 2 pauseSim(sock, 1); - psendPOSI(sock, POSI, 3); + sendPOSI(sock, POSI, 3, 0); int result = getDREFs(sock, drefs, data, 7, sizes); pauseSim(sock, 0);