Skip to content

Commit c5522b7

Browse files
authored
Merge pull request #3774 from LinuxCNC/rmu75-patch-3717
homing.c: Fix accumulation of HOME_OFFSETs when re-homing absolute encoders.
2 parents 1940387 + b7914b4 commit c5522b7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/emc/motion/homing.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,10 @@ static int base_1joint_state_machine(int joint_num)
11411141
/* set the current position to 'home_offset' */
11421142
if (H[joint_num].home_flags & HOME_ABSOLUTE_ENCODER) {
11431143
offset = H[joint_num].home_offset;
1144+
joint->pos_cmd += joint->motor_offset;
1145+
joint->pos_fb += joint->motor_offset;
1146+
joint->free_tp.curr_pos += joint->motor_offset;
1147+
joint->motor_offset = 0;
11441148
} else {
11451149
offset = H[joint_num].home_offset - joint->pos_fb;
11461150
}

0 commit comments

Comments
 (0)