Merge branch 'master' into develop
# Conflicts: # xpcPlugin/XPlaneConnect/mac.xpl # xpcPlugin/xpcPlugin.xcodeproj/project.pbxproj
This commit is contained in:
@@ -61,6 +61,23 @@ typedef enum
|
||||
XPC_WYPT_DEL = 2,
|
||||
XPC_WYPT_CLR = 3
|
||||
} WYPT_OP;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XPC_VIEW_FORWARDS = 73,
|
||||
XPC_VIEW_DOWN,
|
||||
XPC_VIEW_LEFT,
|
||||
XPC_VIEW_RIGHT,
|
||||
XPC_VIEW_BACK,
|
||||
XPC_VIEW_TOWER,
|
||||
XPC_VIEW_RUNWAY,
|
||||
XPC_VIEW_CHASE,
|
||||
XPC_VIEW_FOLLOW,
|
||||
XPC_VIEW_FOLLOWWITHPANEL,
|
||||
XPC_VIEW_SPOT,
|
||||
XPC_VIEW_FULLSCREENWITHHUD,
|
||||
XPC_VIEW_FULLSCREENNOHUD,
|
||||
} VIEW_TYPE;
|
||||
|
||||
// Low Level UDP Functions
|
||||
|
||||
@@ -127,13 +144,27 @@ int sendDATA(XPCSocket sock, float data[][9], int rows);
|
||||
/// http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html. The size of values should match
|
||||
/// the size given on that page. XPC currently sends all values as floats regardless of
|
||||
/// the type described on the wiki. This doesn't cause any data loss for most datarefs.
|
||||
/// \param sock The socket to use to send the command.
|
||||
/// \param dref The name of the dataref to set.
|
||||
/// \param values An array of values representing the data to set.
|
||||
/// \param size The number of elements in values.
|
||||
/// \returns 0 if successful, otherwise a negative value.
|
||||
/// \param sock The socket to use to send the command.
|
||||
/// \param dref The name of the dataref to set.
|
||||
/// \param value An array of values representing the data to set.
|
||||
/// \param size The number of elements in values.
|
||||
/// \returns 0 if successful, otherwise a negative value.
|
||||
int sendDREF(XPCSocket sock, const char* dref, float value[], int size);
|
||||
|
||||
/// Sets the specified datarefs to the specified values.
|
||||
///
|
||||
/// \details dref names and their associated data types can be found on the XPSDK wiki at
|
||||
/// http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html. The size of values should match
|
||||
/// the size given on that page. XPC currently sends all values as floats regardless of
|
||||
/// the type described on the wiki. This doesn't cause any data loss for most datarefs.
|
||||
/// \param sock The socket to use to send the command.
|
||||
/// \param drefs The names of the datarefs to set.
|
||||
/// \param values A multidimensional array containing the values for each dataref to set.
|
||||
/// \param sizes The number of elements in each array in values
|
||||
/// \param count The number of datarefs being set.
|
||||
/// \returns 0 if successful, otherwise a negative value.
|
||||
int sendDREFs(XPCSocket sock, const char* drefs[], float* values[], int sizes[], int count);
|
||||
|
||||
/// Gets the value of the specified dataref.
|
||||
///
|
||||
/// \details dref names and their associated data types can be found on the XPSDK wiki at
|
||||
@@ -165,6 +196,14 @@ int getDREFs(XPCSocket sock, const char* drefs[], float* values[], unsigned char
|
||||
|
||||
// Position
|
||||
|
||||
/// Gets the position and orientation of the specified aircraft.
|
||||
///
|
||||
/// \param sock The socket used to send the command and receive the response.
|
||||
/// \param values An array to store the position information returned by the
|
||||
/// plugin. The format of values is [Lat, Lon, Alt, Pitch, Roll, Yaw, Gear]
|
||||
/// \returns 0 if successful, otherwise a negative value.
|
||||
int getPOSI(XPCSocket sock, float values[7], char ac);
|
||||
|
||||
/// Sets the position and orientation of the specified aircraft.
|
||||
///
|
||||
/// \param sock The socket to use to send the command.
|
||||
@@ -178,6 +217,16 @@ int sendPOSI(XPCSocket sock, float values[], int size, char ac);
|
||||
|
||||
// Controls
|
||||
|
||||
/// Gets the control surface information for the specified aircraft.
|
||||
///
|
||||
/// \param sock The socket used to send the command and receive the response.
|
||||
/// \param values An array to store the position information returned by the
|
||||
/// plugin. The format of values is [Elevator, Aileron, Rudder,
|
||||
/// Throttle, Gear, Flaps, Speed Brakes]
|
||||
/// \param ac The aircraft to set the control surfaces of. 0 is the main/player aircraft.
|
||||
/// \returns 0 if successful, otherwise a negative value.
|
||||
int getCTRL(XPCSocket sock, float values[7], char ac);
|
||||
|
||||
/// Sets the control surfaces of the specified aircraft.
|
||||
///
|
||||
/// \param sock The socket to use to send the command.
|
||||
@@ -200,6 +249,13 @@ int sendCTRL(XPCSocket sock, float values[], int size, char ac);
|
||||
/// \returns 0 if successful, otherwise a negative value.
|
||||
int sendTEXT(XPCSocket sock, char* msg, int x, int y);
|
||||
|
||||
/// Sets the camera view in X-Plane.
|
||||
///
|
||||
/// \param sock The socket to use to send the command.
|
||||
/// \param view The view to use.
|
||||
/// \returns 0 if successful, otherwise a negative value.
|
||||
int sendVIEW(XPCSocket sock, VIEW_TYPE view);
|
||||
|
||||
/// Adds, removes, or clears a set of waypoints. If the command is clear, the points are ignored
|
||||
/// and all points are removed.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user