reverse comparison operators
r1856 | dcl | 2007-04-16 10:46:55 +1000 (Mon, 16 Apr 2007) | 2 lines
This commit is contained in:
@@ -712,15 +712,19 @@ static int DMC2280RunCommon(pDMC2280Driv self,float fValue){
|
|||||||
snprintf(BGx, CMDLEN, "BG%c", axis);
|
snprintf(BGx, CMDLEN, "BG%c", axis);
|
||||||
target = fValue - self->home;
|
target = fValue - self->home;
|
||||||
|
|
||||||
if (self->backlash_offset > FLT_EPSILON && target < self->lastPosition) {
|
if (self->backlash_offset > FLT_EPSILON) {
|
||||||
target += self->backlash_offset;
|
if (target > self->lastPosition) {
|
||||||
if (target > self->fUpper)
|
target += self->backlash_offset;
|
||||||
target = self->fUpper;
|
if (target > self->fUpper)
|
||||||
|
target = self->fUpper;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (self->backlash_offset < -FLT_EPSILON && target > self->lastPosition) {
|
else if (self->backlash_offset < -FLT_EPSILON) {
|
||||||
target += self->backlash_offset;
|
if (target < self->lastPosition) {
|
||||||
if (target < self->fLower)
|
target += self->backlash_offset;
|
||||||
target = self->fLower;
|
if (target < self->fLower)
|
||||||
|
target = self->fLower;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (1 == self->abs_endcoder) {
|
if (1 == self->abs_endcoder) {
|
||||||
|
|||||||
Reference in New Issue
Block a user