From 8f3c91e91b634adaca77dac6cf314445cceefc78 Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Fri, 19 Oct 2012 19:38:06 +0100 Subject: Imported Upstream version 2.1.8.20120912 --- csocketevents.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'csocketevents.c') 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); -- cgit v1.2.3