aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/kinematics/corexz.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/kinematics/corexz.py')
-rw-r--r--klippy/kinematics/corexz.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/klippy/kinematics/corexz.py b/klippy/kinematics/corexz.py
index 584cce59..2543977b 100644
--- a/klippy/kinematics/corexz.py
+++ b/klippy/kinematics/corexz.py
@@ -4,7 +4,7 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging, math
-import stepper, homing
+import stepper
class CoreXZKinematics:
def __init__(self, toolhead, config):
@@ -31,6 +31,9 @@ class CoreXZKinematics:
self.max_z_accel = config.getfloat(
'max_z_accel', max_accel, above=0., maxval=max_accel)
self.limits = [(1.0, -1.0)] * 3
+ ranges = [r.get_range() for r in self.rails]
+ self.axes_min = toolhead.Coord(*[r[0] for r in ranges], e=0.)
+ self.axes_max = toolhead.Coord(*[r[1] for r in ranges], e=0.)
# Setup stepper max halt velocity
max_halt_velocity = toolhead.get_max_axis_halt()
max_xy_halt_velocity = max_halt_velocity * math.sqrt(2.)
@@ -94,14 +97,10 @@ class CoreXZKinematics:
self.max_z_velocity * z_ratio, self.max_z_accel * z_ratio)
def get_status(self, eventtime):
axes = [a for a, (l, h) in zip("xyz", self.limits) if l <= h]
- axes_min = [0.0, 0.0, 0.0, 0.0]
- axes_max = [0.0, 0.0, 0.0, 0.0]
- for pos, rail in enumerate(self.rails):
- axes_min[pos], axes_max[pos] = rail.get_range()
return {
'homed_axes': "".join(axes),
- 'axis_minimum': homing.Coord(*axes_min),
- 'axis_maximum': homing.Coord(*axes_max)
+ 'axis_minimum': self.axes_min,
+ 'axis_maximum': self.axes_max,
}
def load_kinematics(toolhead, config):