aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/kinematics/winch.py
diff options
context:
space:
mode:
authorJanar Sööt <janar.soot@gmail.com>2020-12-28 00:37:32 +0200
committerKevinOConnor <kevin@koconnor.net>2020-12-28 10:19:57 -0500
commite68cf08d15a985ecce7497b58408ee233dd54eb9 (patch)
treeb79435a0b1346686abfd31ccdb4f3c2c0f6e2f23 /klippy/kinematics/winch.py
parenta5ebe5825aa6bbb58b3c755fab77b3472cceed8a (diff)
downloadkutter-e68cf08d15a985ecce7497b58408ee233dd54eb9.tar.gz
kutter-e68cf08d15a985ecce7497b58408ee233dd54eb9.tar.xz
kutter-e68cf08d15a985ecce7497b58408ee233dd54eb9.zip
kinematics: report all axis limits (min/max)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
Diffstat (limited to 'klippy/kinematics/winch.py')
-rw-r--r--klippy/kinematics/winch.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/klippy/kinematics/winch.py b/klippy/kinematics/winch.py
index 04e2d498..4785d8ac 100644
--- a/klippy/kinematics/winch.py
+++ b/klippy/kinematics/winch.py
@@ -3,7 +3,7 @@
# Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
-import stepper, mathutil
+import stepper, mathutil, homing
class WinchKinematics:
def __init__(self, toolhead, config):
@@ -47,7 +47,16 @@ class WinchKinematics:
pass
def get_status(self, eventtime):
# XXX - homed_checks and rail limits not implemented
- return {'homed_axes': 'xyz'}
+ axes_min = [0.0, 0.0, 0.0, 0.0]
+ axes_max = [0.0, 0.0, 0.0, 0.0]
+ for pos, axis in enumerate('xyz'):
+ axes_min[pos] = min([a[pos] for a in self.anchors])
+ axes_max[pos] = max([a[pos] for a in self.anchors])
+ return {
+ 'homed_axes': 'xyz',
+ 'axis_minimum': homing.Coord(*axes_min),
+ 'axis_maximum': homing.Coord(*axes_max)
+ }
def load_kinematics(toolhead, config):
return WinchKinematics(toolhead, config)