From 977aabe038a4fbfa46c2b8873999e9e198f7487f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 13 Oct 2016 10:04:30 -0400 Subject: 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 --- klippy/cartesian.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'klippy/cartesian.py') diff --git a/klippy/cartesian.py b/klippy/cartesian.py index de9d4fa4..860ce9fd 100644 --- a/klippy/cartesian.py +++ b/klippy/cartesian.py @@ -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) -- cgit v1.2.3-70-g09d2