diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-05-09 00:47:30 +0100 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-05-09 00:47:30 +0100 |
commit | 3d928d8dfe2d9af8b3d3ad2eb1d4b878d68704c4 (patch) | |
tree | afd9aac45d87ca26cd83e5b176069195250a3d7f /cphidgetadvancedservo.c | |
parent | d070ed533fe8afdc672c6f04875f2c73f478c196 (diff) | |
parent | 260123716172d33f44bdc0e4e5422554d139215c (diff) | |
download | libphidget21-3d928d8dfe2d9af8b3d3ad2eb1d4b878d68704c4.tar.gz |
Merge tag 'upstream/2.1.8.20120507'
Upstream version 2.1.8.20120507
Diffstat (limited to 'cphidgetadvancedservo.c')
-rw-r--r-- | cphidgetadvancedservo.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cphidgetadvancedservo.c b/cphidgetadvancedservo.c index 12419cb..8b5624b 100644 --- a/cphidgetadvancedservo.c +++ b/cphidgetadvancedservo.c @@ -310,7 +310,7 @@ CPHIDGETDATA(AdvancedServo) else phid->motorPositionEcho[i] = position[i]; if(velocity[i] > phid->velocityMaxLimit || velocity[i] < -phid->velocityMaxLimit) - LOG(PHIDGET_LOG_WARNING, "Phidget advanced servo recieved out of range velocity data: %lE", velocity[i]); + LOG(PHIDGET_LOG_WARNING, "Phidget advanced servo received out of range velocity data: %lE", velocity[i]); else phid->motorVelocityEcho[i] = velocity[i]; @@ -570,8 +570,8 @@ CSETINDEX(AdvancedServo,Acceleration,double) TESTDEVICETYPE(PHIDCLASS_ADVANCEDSERVO) TESTATTACHED TESTINDEX(phid.attr.advancedservo.numMotors) - TESTRANGE(servo_us_to_degrees_vel(phid->servoParams[Index], phid->accelerationMin, PFALSE), - servo_us_to_degrees_vel(phid->servoParams[Index], phid->accelerationMax, PFALSE)) + TESTRANGE(servo_us_to_degrees_vel(phid->servoParams[Index], phid->accelerationMin, PFALSE)-0.5, + servo_us_to_degrees_vel(phid->servoParams[Index], phid->accelerationMax, PFALSE)+0.5) newVal = servo_degrees_to_us_vel(phid->servoParams[Index], newVal); @@ -620,8 +620,8 @@ CSETINDEX(AdvancedServo,VelocityLimit,double) TESTDEVICETYPE(PHIDCLASS_ADVANCEDSERVO) TESTATTACHED TESTINDEX(phid.attr.advancedservo.numMotors) - TESTRANGE(servo_us_to_degrees_vel(phid->servoParams[Index], phid->velocityMin, PTRUE)-0.5, - servo_us_to_degrees_vel(phid->servoParams[Index], phid->velocityMax[Index]+0.5, PTRUE)) + TESTRANGE(servo_us_to_degrees_vel(phid->servoParams[Index], phid->velocityMin, PFALSE)-0.5, + servo_us_to_degrees_vel(phid->servoParams[Index], phid->velocityMax[Index], PFALSE)+0.5) newVal = servo_degrees_to_us_vel(phid->servoParams[Index], newVal); @@ -684,8 +684,8 @@ CSETINDEX(AdvancedServo,Position,double) TESTDEVICETYPE(PHIDCLASS_ADVANCEDSERVO) TESTATTACHED TESTINDEX(phid.attr.advancedservo.numMotors) - TESTRANGE(servo_us_to_degrees(phid->servoParams[Index], phid->motorPositionMin[Index], PTRUE)-0.5, - servo_us_to_degrees(phid->servoParams[Index], phid->motorPositionMax[Index], PTRUE)+0.5) + TESTRANGE(servo_us_to_degrees(phid->servoParams[Index], phid->motorPositionMin[Index], PFALSE)-0.5, + servo_us_to_degrees(phid->servoParams[Index], phid->motorPositionMax[Index], PFALSE)+0.5) newVal = servo_degrees_to_us(phid->servoParams[Index], newVal); |