Skip to content

Commit 7242b3f

Browse files
hdiethelmandypugh
authored andcommitted
Fix issue identified in PR #3820: Always update teleop_vel_cmd and pos_cmd
1 parent 006aa02 commit 7242b3f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/emc/motion/axis.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,15 +659,14 @@ int axis_calc_motion(double servo_period)
659659

660660
for (axis_num = 0; axis_num < EMCMOT_MAX_AXIS; axis_num++) {
661661
axis = &axis_array[axis_num];
662+
axis->teleop_vel_cmd = axis->teleop_tp.curr_vel;
663+
axis->pos_cmd = axis->teleop_tp.curr_pos;
662664
// teleop_tp.max_vel is always positive
663665
if (axis->teleop_tp.max_vel > axis->vel_limit) {
664666
axis->teleop_tp.max_vel = axis->vel_limit;
665667
}
666668
if (update_teleop_with_check(axis_num, &(axis->teleop_tp), servo_period)) {
667669
violated_teleop_limit = 1;
668-
} else {
669-
axis->teleop_vel_cmd = axis->teleop_tp.curr_vel;
670-
axis->pos_cmd = axis->teleop_tp.curr_pos;
671670
}
672671

673672
if (!axis->teleop_tp.active) {

0 commit comments

Comments
 (0)