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