Tweaked param name on setDREF in C client.
This commit is contained in:
@@ -350,7 +350,7 @@ int readDATA(XPCSocket sock, float dataRef[][9], int rows)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**** DREF functions ****/
|
/**** DREF functions ****/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
int setDREF(XPCSocket sock, const char* dref, float values[], int size)
|
int setDREF(XPCSocket sock, const char* dref, float value[], int size)
|
||||||
{
|
{
|
||||||
// Setup command
|
// Setup command
|
||||||
// 5 byte header + max 255 char dref name + max 255 values * 4 bytes per value = 1279
|
// 5 byte header + max 255 char dref name + max 255 values * 4 bytes per value = 1279
|
||||||
@@ -374,13 +374,13 @@ int setDREF(XPCSocket sock, const char* dref, float values[], int size)
|
|||||||
|
|
||||||
// Copy values to buffer
|
// Copy values to buffer
|
||||||
buffer[6 + drefLen] = (unsigned char)size;
|
buffer[6 + drefLen] = (unsigned char)size;
|
||||||
memcpy(buffer + 7 + drefLen, values, size * sizeof(float));
|
memcpy(buffer + 7 + drefLen, value, size * sizeof(float));
|
||||||
|
|
||||||
// Send command
|
// Send command
|
||||||
if (sendUDP(sock, buffer, len) < 0)
|
if (sendUDP(sock, buffer, len) < 0)
|
||||||
{
|
{
|
||||||
printError("setDREF", "Failed to send command");
|
printError("setDREF", "Failed to send command");
|
||||||
return -2;
|
return -3;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ int sendDATA(XPCSocket sock, float dataRef[][9], int rows);
|
|||||||
/// \param values An array of values representing the data to set.
|
/// \param values An array of values representing the data to set.
|
||||||
/// \param size The number of elements in values.
|
/// \param size The number of elements in values.
|
||||||
/// \returns 0 if successful, otherwise a negative value.
|
/// \returns 0 if successful, otherwise a negative value.
|
||||||
int setDREF(XPCSocket sock, const char* dref, float values[], int size);
|
int setDREF(XPCSocket sock, const char* dref, float value[], int size);
|
||||||
|
|
||||||
/// Gets the value of the specified dataref.
|
/// Gets the value of the specified dataref.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user