From: Jeff E. <gi...@gi...> - 2013-08-19 20:06:05
|
motion: treat a point as out of range when it it is not finite (not finite includes not only points at infinity, but also points which are NaNs. The existing comparisons were enough to weed out infinities) http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=aeb2da2 --- src/emc/motion/command.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/emc/motion/command.c b/src/emc/motion/command.c index f926a73..0246e1d 100644 --- a/src/emc/motion/command.c +++ b/src/emc/motion/command.c @@ -266,6 +266,13 @@ static int inRange(EmcPose pos, int id, char *move_type) /* if joint is not active, don't even look at its limits */ continue; } + if(!isfinite(joint_pos[joint_num])) + { + reportError(_("%s move on line %d gave non-finite joint location on joint %d"), + move_type, id, joint_num); + in_range = 0; + continue; + } if (joint_pos[joint_num] > joint->max_pos_limit) { in_range = 0; reportError(_("%s move on line %d would exceed joint %d's positive limit"), |