aboutsummaryrefslogtreecommitdiffstats
path: root/cphidgetadvancedservo.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-05-09 00:47:30 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-05-09 00:47:30 +0100
commit260123716172d33f44bdc0e4e5422554d139215c (patch)
tree840e8e6387b96bd6f9afe3ffebc19c781a112f1b /cphidgetadvancedservo.c
parent0b624384cd52be20e61284551d832b499d7b7707 (diff)
downloadlibphidget21-260123716172d33f44bdc0e4e5422554d139215c.tar.gz
Imported Upstream version 2.1.8.20120507upstream/2.1.8.20120507
Diffstat (limited to 'cphidgetadvancedservo.c')
-rw-r--r--cphidgetadvancedservo.c14
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);