From e68cf08d15a985ecce7497b58408ee233dd54eb9 Mon Sep 17 00:00:00 2001 From: Janar Sööt Date: Mon, 28 Dec 2020 00:37:32 +0200 Subject: kinematics: report all axis limits (min/max) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Janar Sööt --- klippy/kinematics/cartesian.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'klippy/kinematics/cartesian.py') diff --git a/klippy/kinematics/cartesian.py b/klippy/kinematics/cartesian.py index b568dae8..ed9b19b3 100644 --- a/klippy/kinematics/cartesian.py +++ b/klippy/kinematics/cartesian.py @@ -4,7 +4,7 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import logging -import stepper +import stepper, homing class CartKinematics: def __init__(self, toolhead, config): @@ -118,7 +118,15 @@ class CartKinematics: 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] - return { 'homed_axes': "".join(axes) } + 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) + } # Dual carriage support def _activate_carriage(self, carriage): toolhead = self.printer.lookup_object('toolhead') -- cgit v1.2.3-70-g09d2