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>
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user