diff options
Diffstat (limited to 'klippy/kinematics/winch.py')
-rw-r--r-- | klippy/kinematics/winch.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/klippy/kinematics/winch.py b/klippy/kinematics/winch.py index 4785d8ac..b5d3c245 100644 --- a/klippy/kinematics/winch.py +++ b/klippy/kinematics/winch.py @@ -1,9 +1,9 @@ # Code for handling the kinematics of cable winch robots # -# Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net> +# Copyright (C) 2018-2021 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. -import stepper, mathutil, homing +import stepper, mathutil class WinchKinematics: def __init__(self, toolhead, config): @@ -28,6 +28,9 @@ class WinchKinematics: for s in self.steppers: s.set_max_jerk(max_halt_velocity, max_accel) # Setup boundary checks + acoords = zip(*self.anchors) + self.axes_min = toolhead.Coord(*[min(a) for a in acoords], e=0.) + self.axes_max = toolhead.Coord(*[max(a) for a in acoords], e=0.) self.set_position([0., 0., 0.], ()) def get_steppers(self): return list(self.steppers) @@ -47,15 +50,10 @@ class WinchKinematics: pass def get_status(self, eventtime): # XXX - homed_checks and rail limits not implemented - 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) + 'axis_minimum': self.axes_min, + 'axis_maximum': self.axes_max, } def load_kinematics(toolhead, config): |