diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-01-08 11:52:28 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-01-08 11:52:28 -0500 |
commit | c8434ec54b0517503af4aeee9016783d508118b0 (patch) | |
tree | 7229f2ea5c4f63a7fad9c46ef6f84adc614b96fa /klippy/kinematics/none.py | |
parent | f79187d726d00c7215448e5953cdb0dd8d490683 (diff) | |
download | kutter-c8434ec54b0517503af4aeee9016783d508118b0.tar.gz kutter-c8434ec54b0517503af4aeee9016783d508118b0.tar.xz kutter-c8434ec54b0517503af4aeee9016783d508118b0.zip |
kinematics: Calculate axis_minimum/axis_maximum in advance
Calculate the get_status() axis_minimum and axis_maximum fields in
advance so that they don't need to be calculated on each get_status()
call.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/kinematics/none.py')
-rw-r--r-- | klippy/kinematics/none.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/klippy/kinematics/none.py b/klippy/kinematics/none.py index e022b2d6..fdc3d4c4 100644 --- a/klippy/kinematics/none.py +++ b/klippy/kinematics/none.py @@ -1,13 +1,12 @@ # Dummy "none" kinematics support (for developer testing) # -# Copyright (C) 2018 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 homing class NoneKinematics: def __init__(self, toolhead, config): - pass + self.axes_minmax = toolhead.Coord(0., 0., 0., 0.) def get_steppers(self): return [] def calc_tag_position(self): @@ -19,11 +18,10 @@ class NoneKinematics: def check_move(self, move): pass def get_status(self, eventtime): - axes_lim = [0.0, 0.0, 0.0, 0.0] return { 'homed_axes': '', - 'axis_minimum': homing.Coord(*axes_lim), - 'axis_maximum': homing.Coord(*axes_lim) + 'axis_minimum': self.axes_minmax, + 'axis_maximum': self.axes_minmax, } def load_kinematics(toolhead, config): |