Renamed "setDREF" function back to "sendDREF".
This commit is contained in:
@@ -362,7 +362,7 @@ int readDATA(XPCSocket sock, float data[][9], int rows)
|
||||
/*****************************************************************************/
|
||||
/**** DREF functions ****/
|
||||
/*****************************************************************************/
|
||||
int setDREF(XPCSocket sock, const char* dref, float value[], int size)
|
||||
int sendDREF(XPCSocket sock, const char* dref, float value[], int size)
|
||||
{
|
||||
// Setup command
|
||||
// 5 byte header + max 255 char dref name + max 255 values * 4 bytes per value = 1279
|
||||
|
||||
@@ -133,7 +133,7 @@ int sendDATA(XPCSocket sock, float data[][9], int rows);
|
||||
/// \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.
|
||||
int setDREF(XPCSocket sock, const char* dref, float value[], int size);
|
||||
int sendDREF(XPCSocket sock, const char* dref, float value[], int size);
|
||||
|
||||
/// Gets the value of the specified dataref.
|
||||
///
|
||||
|
||||
@@ -93,7 +93,7 @@ int main()
|
||||
|
||||
const char* dref = "sim/cockpit/switches/gear_handle_status"; // Gear handle data reference
|
||||
float gear = 0; // Stow gear
|
||||
setDREF(sock, dref, &gear, 1); // Set gear to stow
|
||||
sendDREF(sock, dref, &gear, 1); // Set gear to stow
|
||||
|
||||
// Simulate for 10 seconds
|
||||
sleep(10);
|
||||
|
||||
Reference in New Issue
Block a user