mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-11 16:57:55 -06:00
endstop_phase: Move endstop phase homing code to new "extras" module
Move the endstop phase tracking code from stepper.py to a new extras/endstop_phase.py module. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
216905ceca
commit
a2df01b88e
5 changed files with 114 additions and 89 deletions
|
@ -124,14 +124,14 @@ class Homing:
|
|||
self.toolhead.set_position(forcepos)
|
||||
self.homing_move(movepos, endstops, second_homing_speed,
|
||||
verify_movement=self.verify_retract)
|
||||
# Apply homing offsets
|
||||
for rail in rails:
|
||||
cp = rail.get_commanded_position()
|
||||
rail.set_commanded_position(cp + rail.get_homed_offset())
|
||||
adjustpos = self.toolhead.get_kinematics().calc_position()
|
||||
for axis in homing_axes:
|
||||
movepos[axis] = adjustpos[axis]
|
||||
self.toolhead.set_position(movepos)
|
||||
# Signal home operation complete
|
||||
ret = self.printer.send_event("homing:homed_rails", self, rails)
|
||||
if any(ret):
|
||||
# Apply any homing offsets
|
||||
adjustpos = self.toolhead.get_kinematics().calc_position()
|
||||
for axis in homing_axes:
|
||||
movepos[axis] = adjustpos[axis]
|
||||
self.toolhead.set_position(movepos)
|
||||
def home_axes(self, axes):
|
||||
self.changed_axes = axes
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue