Skip to content

Commit b7914b4

Browse files
authored
Update homing.c
fix multiple homing of absolute encoders #3717
1 parent 5b13d3b commit b7914b4

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
@@ -1128,6 +1128,10 @@ static int base_1joint_state_machine(int joint_num)
11281128
/* set the current position to 'home_offset' */
11291129
if (H[joint_num].home_flags & HOME_ABSOLUTE_ENCODER) {
11301130
offset = H[joint_num].home_offset;
1131+
joint->pos_cmd += joint->motor_offset;
1132+
joint->pos_fb += joint->motor_offset;
1133+
joint->free_tp.curr_pos += joint->motor_offset;
1134+
joint->motor_offset = 0;
11311135
} else {
11321136
offset = H[joint_num].home_offset - joint->pos_fb;
11331137
}

0 commit comments

Comments
 (0)