diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-10-09 12:53:01 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-10-10 14:30:09 -0400 |
commit | d32506bd2eb6c5231d83b063ad528a26f0dda563 (patch) | |
tree | dd539e776ca39d060527043d861c5c4e8dd2a92a /klippy/homing.py | |
parent | 770b92863f391df5af45909070bc2e87609c5d45 (diff) | |
download | kutter-d32506bd2eb6c5231d83b063ad528a26f0dda563.tar.gz kutter-d32506bd2eb6c5231d83b063ad528a26f0dda563.tar.xz kutter-d32506bd2eb6c5231d83b063ad528a26f0dda563.zip |
homing: Move homing offset adjustment logic to generic homing code
Move the "stepper phase" adjustment logic from the kinematic classes
to the generic homing.py code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/homing.py')
-rw-r--r-- | klippy/homing.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/klippy/homing.py b/klippy/homing.py index c53a65d4..901af03d 100644 --- a/klippy/homing.py +++ b/klippy/homing.py @@ -123,6 +123,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) def home_axes(self, axes): self.changed_axes = axes try: |