stepper: Return homing offset in steps instead of an absolute position

Rename get_homed_position() to get_homed_offset() and return the
endstop position delta in steps instead of an absolute position
relative to position_endstop.  The conversion to absolute positions
can be dependent on the type of kinematics in use, so is inappropriate
to do in the low level stepper.py code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2016-10-13 10:04:30 -04:00
parent da7d8dbcac
commit 977aabe038
2 changed files with 7 additions and 6 deletions

View file

@ -28,7 +28,8 @@ class CartKinematics:
max_xy_accel = min(s.max_accel for s in self.steppers[:2])
return max_xy_speed, max_xy_accel
def get_homed_position(self):
return [s.get_homed_position() for s in self.steppers]
return [s.position_endstop + s.get_homed_offset()*s.step_dist
for s in self.steppers]
def home(self, toolhead, axes):
# Each axis is homed independently and in order
homing_state = homing.Homing(toolhead, axes)