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/polar.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'klippy/kinematics/polar.py') diff --git a/klippy/kinematics/polar.py b/klippy/kinematics/polar.py index 0873de65..14c92437 100644 --- a/klippy/kinematics/polar.py +++ b/klippy/kinematics/polar.py @@ -4,7 +4,7 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import logging, math -import stepper +import stepper, homing class PolarKinematics: def __init__(self, toolhead, config): @@ -108,7 +108,15 @@ class PolarKinematics: def get_status(self, eventtime): xy_home = "xy" if self.limit_xy2 >= 0. else "" z_home = "z" if self.limit_z[0] <= self.limit_z[1] else "" - return {'homed_axes': xy_home + z_home} + lim_xy = self.rails[0].get_range() + lim_z = self.rails[1].get_range() + axes_min = [lim_xy[0], lim_xy[0], lim_z[0], 0.] + axes_max = [lim_xy[1], lim_xy[1], lim_z[1], 0.] + return { + 'homed_axes': xy_home + z_home, + 'axis_minimum': homing.Coord(*axes_min), + 'axis_maximum': homing.Coord(*axes_max) + } def load_kinematics(toolhead, config): return PolarKinematics(toolhead, config) -- cgit v1.2.3-70-g09d2