Skip to content

Commit 4657973

Browse files
committed
command.c: EMCMOT_JOINT_ABORT set joint jog inactive
Forum users using probe_basic (not in-tree) and a pendant vc-4ps (not in-tree) reported unexpected messages: "Ignoring task mode change while jogging" after activating mdi mode even though they were not jogging. This message was introduced by changes for commit 87f66fe The problem was not duplicated using in-tree qtvcp qtdragon.ini sim config(s). 1) User vc-4ps hal configurations typically connect halui plus/minus jog pins for each axis letter with the corresponding identity joint number (e.g., halui.joint.0.plus == halui.axis.x.plus, ... etc) 2) halui plus/minus jogging issues EMCMOT_JOINT_ABORT to terminate an axis *or* a joint jog but formerly joint jogging pins were not set to indicate jogging inactive when the message was specifying a joint number. Note: EMCMOT_JOINT_ABORT is a misnomer, the message is issued for both joints (using a joint number) and for axis coordinates (using an axis number) This commit ensures that EMCMOT_JOINT_ABORT properly sets joint jogging as inactive (kb, wheel) if message refers to a valid joint number. https://forum.linuxcnc.org/qtvcp/46031-a-couple-of-errors-during-update-2-8-2-130-g87f66feaf#247599 diff --git a/src/emc/motion/command.c b/src/emc/motion/command.c index 2386784..81d8e38 100644 --- a/src/emc/motion/command.c +++ b/src/emc/motion/command.c @@ -480,6 +480,7 @@ void emcmotCommandHandler(void *arg, long servo_period) return; } } + if (GET_MOTION_COORD_FLAG()) return; //silently ignore } if (abort) { switch (emcmotCommand->command) {
1 parent b1cb169 commit 4657973

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/emc/motion/command.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -570,27 +570,27 @@ void emcmotCommandHandler(void *arg, long servo_period)
570570
break;
571571

572572
case EMCMOT_JOINT_ABORT:
573-
/* abort one joint */
573+
/* abort one joint number or axis number */
574574
/* can happen at any time */
575-
rtapi_print_msg(RTAPI_MSG_DBG, "JOINT_ABORT");
576-
rtapi_print_msg(RTAPI_MSG_DBG, " %d", joint_num);
577575
if (GET_MOTION_TELEOP_FLAG()) {
578-
/* tell teleop planner to stop */
579-
if (axis != 0) axis->teleop_tp.enable = 0;
580-
/* do nothing in teleop mode */
581-
} else if (GET_MOTION_COORD_FLAG()) {
582-
/* do nothing in coord mode */
576+
/* tell teleop planner to stop */
577+
if (axis) {
578+
axis->teleop_tp.enable = 0;
579+
axis->kb_ajog_active = 0;
580+
axis->wheel_ajog_active = 0;
581+
}
583582
} else {
584-
/* tell joint planner to stop */
585-
if (joint != 0) joint->free_tp.enable = 0;
586-
/* validate joint */
587-
if (joint == 0) { break; }
588-
/* stop homing if in progress */
589-
if ( joint->home_state != HOME_IDLE ) {
590-
joint->home_state = HOME_ABORT;
591-
}
592-
/* update status flags */
593-
SET_JOINT_ERROR_FLAG(joint, 0);
583+
if (joint == 0) { break; }
584+
/* tell joint planner to stop */
585+
joint->free_tp.enable = 0;
586+
joint->kb_jjog_active = 0;
587+
joint->wheel_jjog_active = 0;
588+
/* stop homing if in progress */
589+
if ( joint->home_state != HOME_IDLE ) {
590+
joint->home_state = HOME_ABORT;
591+
}
592+
/* update status flags */
593+
SET_JOINT_ERROR_FLAG(joint, 0);
594594
}
595595
break;
596596

0 commit comments

Comments
 (0)