From 260123716172d33f44bdc0e4e5422554d139215c Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Wed, 9 May 2012 00:47:30 +0100 Subject: Imported Upstream version 2.1.8.20120507 --- cphidgetadvancedservo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cphidgetadvancedservo.c') 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); -- cgit v1.2.3