aboutsummaryrefslogtreecommitdiffstats
path: root/csocketevents.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-12-05 23:35:47 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-12-05 23:35:47 +0000
commitd793256d203fde3090d3729f70e0595674fa48d6 (patch)
tree3ef1aefbe45529a2063630b05a7be6dcd2c13fbc /csocketevents.c
parent3d9394c18ca528ac78197007d1a2dfff6f401920 (diff)
parent8f3c91e91b634adaca77dac6cf314445cceefc78 (diff)
downloadlibphidget21-d793256d203fde3090d3729f70e0595674fa48d6.tar.gz
Merge tag 'upstream/2.1.8.20120912'
Diffstat (limited to 'csocketevents.c')
-rw-r--r--csocketevents.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/csocketevents.c b/csocketevents.c
index 6ad4ca1..e1e32e1 100644
--- a/csocketevents.c
+++ b/csocketevents.c
@@ -867,8 +867,8 @@ PWC_SETKEYS(LED)
{
if(CHKINDEX(led.numLEDs, LED_MAXLEDS))
{
- GET_INT_VAL;
- INC_KEYCOUNT(LED_Power[index], PUNI_INT)
+ GET_DOUBLE_VAL;
+ INC_KEYCOUNT(LED_Power[index], PUNI_DBL)
phid->LED_Power[index] = value;
}
else
@@ -1035,6 +1035,7 @@ PWC_SETKEYS(MotorControl)
if(CHKINDEX(motorcontrol.numMotors, MOTORCONTROL_MAXMOTORS))
{
GET_DOUBLE_VAL;
+ INC_KEYCOUNT(motorSensedCurrent[index], PUNI_DBL)
phid->motorSensedCurrent[index] = value;
if(value != PUNK_DBL)
FIRE(CurrentUpdate, index, value);
@@ -2029,7 +2030,8 @@ void network_phidget_event_handler(const char *key, const char *val, unsigned in
if((phid->initKeys != PUNK_INT)
&& (phid->keyCount >= phid->initKeys)
&& !CPhidget_statusFlagIsSet(phid->status, PHIDGET_ATTACHED_FLAG)
- && CPhidget_statusFlagIsSet(phid->status, PHIDGET_OPENED_FLAG))
+ && CPhidget_statusFlagIsSet(phid->status, PHIDGET_OPENED_FLAG)
+ && CPhidget_statusFlagIsSet(phid->status, PHIDGET_SERVER_CONNECTED_FLAG))
{
LOG(PHIDGET_LOG_VERBOSE, "Got all initkeys, run attach - %d/%d", phid->keyCount, phid->initKeys);