aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/cartesian.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-10-13 10:04:30 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-10-13 10:09:56 -0400
commit977aabe038a4fbfa46c2b8873999e9e198f7487f (patch)
treee3160bea85c5d63d71c94bf20b4523cd07a77187 /klippy/cartesian.py
parentda7d8dbcac03434b046248fad3edfa78a514e733 (diff)
downloadkutter-977aabe038a4fbfa46c2b8873999e9e198f7487f.tar.gz
kutter-977aabe038a4fbfa46c2b8873999e9e198f7487f.tar.xz
kutter-977aabe038a4fbfa46c2b8873999e9e198f7487f.zip
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>
Diffstat (limited to 'klippy/cartesian.py')
-rw-r--r--klippy/cartesian.py3
1 files changed, 2 insertions, 1 deletions
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)