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 <kevin@koconnor.net>
This commit is contained in:
parent
224574da4a
commit
eed371e924
|
@ -88,12 +88,12 @@ class EndstopPhase:
|
||||||
stepper = rail.get_steppers()[0]
|
stepper = rail.get_steppers()[0]
|
||||||
if stepper.get_name() != self.name:
|
if stepper.get_name() != self.name:
|
||||||
continue
|
continue
|
||||||
orig_pos = rail.get_commanded_position()
|
orig_pos = rail.get_tag_position()
|
||||||
offset = self.get_homed_offset(stepper)
|
offset = self.get_homed_offset(stepper)
|
||||||
pos = self.align_endstop(orig_pos) + offset
|
pos = self.align_endstop(orig_pos) + offset
|
||||||
if pos == orig_pos:
|
if pos == orig_pos:
|
||||||
return False
|
return False
|
||||||
rail.set_commanded_position(pos)
|
rail.set_tag_position(pos)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
class EndstopPhases:
|
class EndstopPhases:
|
||||||
|
|
|
@ -115,12 +115,12 @@ class Homing:
|
||||||
self.homing_move(movepos, endstops, hi.second_homing_speed,
|
self.homing_move(movepos, endstops, hi.second_homing_speed,
|
||||||
verify_movement=self.verify_retract)
|
verify_movement=self.verify_retract)
|
||||||
# Signal home operation complete
|
# 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)
|
ret = self.printer.send_event("homing:homed_rails", self, rails)
|
||||||
if any(ret):
|
if any(ret):
|
||||||
# Apply any homing offsets
|
# 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()
|
adjustpos = kin.calc_tag_position()
|
||||||
for axis in homing_axes:
|
for axis in homing_axes:
|
||||||
movepos[axis] = adjustpos[axis]
|
movepos[axis] = adjustpos[axis]
|
||||||
|
|
Loading…
Reference in New Issue