From eed371e9248dc5fb8d676df0b5164a3e24b7a47e Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 13 Nov 2019 18:11:13 -0500 Subject: [PATCH] endstop_phase: Use set_tag_position() instead of set_commanded_position() Use the new get/set_tag_position() calls to avoid altering the low-level kinematic position. Signed-off-by: Kevin O'Connor --- klippy/extras/endstop_phase.py | 4 ++-- klippy/homing.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/klippy/extras/endstop_phase.py b/klippy/extras/endstop_phase.py index 89ee1891..2a5be62e 100644 --- a/klippy/extras/endstop_phase.py +++ b/klippy/extras/endstop_phase.py @@ -88,12 +88,12 @@ class EndstopPhase: stepper = rail.get_steppers()[0] if stepper.get_name() != self.name: continue - orig_pos = rail.get_commanded_position() + orig_pos = rail.get_tag_position() offset = self.get_homed_offset(stepper) pos = self.align_endstop(orig_pos) + offset if pos == orig_pos: return False - rail.set_commanded_position(pos) + rail.set_tag_position(pos) return True class EndstopPhases: diff --git a/klippy/homing.py b/klippy/homing.py index 0f3ee308..50e3176e 100644 --- a/klippy/homing.py +++ b/klippy/homing.py @@ -115,12 +115,12 @@ class Homing: self.homing_move(movepos, endstops, hi.second_homing_speed, verify_movement=self.verify_retract) # Signal home operation complete + kin = self.toolhead.get_kinematics() + for s in kin.get_steppers(): + s.set_tag_position(s.get_commanded_position()) ret = self.printer.send_event("homing:homed_rails", self, rails) if any(ret): # Apply any homing offsets - kin = self.toolhead.get_kinematics() - for s in kin.get_steppers(): - s.set_tag_position(s.get_commanded_position()) adjustpos = kin.calc_tag_position() for axis in homing_axes: movepos[axis] = adjustpos[axis]