From 02f4c92fcefde01a4ca3e32b92c22640b681fdcb Mon Sep 17 00:00:00 2001 From: Jason Watkins Date: Wed, 22 Apr 2015 16:25:19 -0700 Subject: [PATCH] Tweaked param name on setDREF in C client. --- C/src/xplaneConnect.c | 6 +++--- C/src/xplaneConnect.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/C/src/xplaneConnect.c b/C/src/xplaneConnect.c index 8fc6d52..8061c1b 100755 --- a/C/src/xplaneConnect.c +++ b/C/src/xplaneConnect.c @@ -350,7 +350,7 @@ int readDATA(XPCSocket sock, float dataRef[][9], int rows) /*****************************************************************************/ /**** 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 // 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 buffer[6 + drefLen] = (unsigned char)size; - memcpy(buffer + 7 + drefLen, values, size * sizeof(float)); + memcpy(buffer + 7 + drefLen, value, size * sizeof(float)); // Send command if (sendUDP(sock, buffer, len) < 0) { printError("setDREF", "Failed to send command"); - return -2; + return -3; } return 0; } diff --git a/C/src/xplaneConnect.h b/C/src/xplaneConnect.h index 9374551..197550c 100644 --- a/C/src/xplaneConnect.h +++ b/C/src/xplaneConnect.h @@ -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 size The number of elements in values. /// \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. ///