diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-10-19 19:38:06 +0100 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-10-19 19:38:06 +0100 |
commit | 2891593727a0151a66ed7860fed6399548c74c02 (patch) | |
tree | 1cb52da179b4ab23ba2a22f44d88ea3523f51f0c /csocketevents.c | |
parent | cff96463a694573a9f87b014482a45c25bf4c7b0 (diff) | |
parent | 8f3c91e91b634adaca77dac6cf314445cceefc78 (diff) | |
download | libphidget21-2891593727a0151a66ed7860fed6399548c74c02.tar.gz |
Merge tag 'upstream/2.1.8.20120912'
Upstream version 2.1.8.20120912
Diffstat (limited to 'csocketevents.c')
-rw-r--r-- | csocketevents.c | 8 |
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); |