aboutsummaryrefslogtreecommitdiffstats
path: root/csocketevents.c
diff options
context:
space:
mode:
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);