mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-24 23:24:01 -06:00
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:
parent
f79187d726
commit
c8434ec54b
9 changed files with 71 additions and 77 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue