Merge pull request #182 from FreddieAkeroyd/Ticket181_fix_relative_moves_with_negative_backlash

Fix negative backlash with relative moves in a negative direction.  Fixes #181
This commit is contained in:
Kevin Peterson
2021-12-01 14:21:58 -06:00
committed by GitHub
+1 -1
View File
@@ -2410,7 +2410,7 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind)
}
/* IF move is in preferred direction, AND, current position is within backlash range. */
else if ((preferred_dir == true) &&
((use_rel == true && relbpos <= 1.0) ||
((use_rel == true && ((pmr->bdst >= 0 && relbpos <= 1.0) || (pmr->bdst < 0 && relbpos >= 1.0))) ||
(use_rel == false && (fabs(newpos - currpos) <= rbdst1))
)
)