Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix when switching kinematics while in teleop mode with machine enabled #3058

Open
wants to merge 3 commits into
base: 2.9
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/emc/motion/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,14 @@ static void handle_kinematicsSwitch(void) {
}
#endif
tpSetPos(&emcmotInternal->coord_tp, &emcmotStatus->carte_pos_cmd);

/* Also synch teleop mode to avoid change in joint cmd */
for (int axis_num = 0; axis_num < MAX_AXIS_AMOUNT; axis_num++) {
emcmot_axis_t *axis;
axis = &axes[axis_num];
axis->teleop_tp.curr_pos = *pcmd_p[axis_num];
}

} //handle_kinematicsSwitch()

static void process_inputs(void)
Expand Down Expand Up @@ -1471,6 +1479,11 @@ static void get_pos_cmds(long period)
for (joint_num = 0; joint_num < ALL_JOINTS; joint_num++) {
/* point to joint data */
joint = &joints[joint_num];

/* Zero values */
joint_limit[joint_num][0] = 0;
joint_limit[joint_num][1] = 0;

/* skip inactive or unhomed axes */
if ((!GET_JOINT_ACTIVE_FLAG(joint)) || (!get_homed(joint_num))) {
continue;
Expand Down
Loading