From 761ee793bae272644c3f95fcb24993bed72f17f8 Mon Sep 17 00:00:00 2001 From: Chris Teubert Date: Wed, 29 Apr 2015 13:57:50 -0700 Subject: [PATCH] Updates to use new function names --- C/src/xplaneConnect.c | 2 +- C/xpcExample/xpcExample/src/main.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/C/src/xplaneConnect.c b/C/src/xplaneConnect.c index d3e81a7..07adcd2 100755 --- a/C/src/xplaneConnect.c +++ b/C/src/xplaneConnect.c @@ -242,7 +242,7 @@ int setCONN(XPCSocket* sock, unsigned short port) // Switch socket closeUDP(*sock); - *sock = openUDP(sock->xpIP, sock->xpPort, port); + *sock = aopenUDP(sock->xpIP, sock->xpPort, port); // Read response int result; diff --git a/C/xpcExample/xpcExample/src/main.cpp b/C/xpcExample/xpcExample/src/main.cpp index acc9219..17b2a81 100644 --- a/C/xpcExample/xpcExample/src/main.cpp +++ b/C/xpcExample/xpcExample/src/main.cpp @@ -22,8 +22,7 @@ int main() // Open Socket const char* IP = "127.0.0.1"; //IP Address of computer running X-Plane - const unsigned short PORT = 49009; //xpcPlugin Receiving port (usually 49009) - XPCSocket sock = aopenUDP(IP, PORT); + XPCSocket sock = openUDP(IP); // Set Location/Orientation (sendPOSI) // Set Up Position Array @@ -37,7 +36,7 @@ int main() POSI[6] = 1; // Gear // Set position of the player aircraft - psendPOSI(sock, POSI, 7); + sendPOSI(sock, POSI, 7, 0); POSI[0] = 37.52465; // Move a second aircraft a bit North of us POSI[4] = 20; // Give that aircraft a bit or right roll @@ -75,7 +74,7 @@ int main() // Set throttle on the player aircraft using sendCTRL float CTRL[5] = { 0.0 }; CTRL[3] = 0.8; // Throttle - psendCTRL(sock, CTRL, 5); + sendCTRL(sock, CTRL, 5, 0); // pauseSim pauseSim(sock, 1); // Sending 1 to pause