aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-01-08 11:52:28 -0500
committerKevin O'Connor <kevin@koconnor.net>2021-01-08 11:52:28 -0500
commitc8434ec54b0517503af4aeee9016783d508118b0 (patch)
tree7229f2ea5c4f63a7fad9c46ef6f84adc614b96fa /klippy/toolhead.py
parentf79187d726d00c7215448e5953cdb0dd8d490683 (diff)
downloadkutter-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/toolhead.py')
-rw-r--r--klippy/toolhead.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index 43931e4d..82cc1556 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -196,6 +196,7 @@ class DripModeEndSignal(Exception):
# Main code to track events (and their timing) on the printer toolhead
class ToolHead:
+ Coord = homing.Coord
def __init__(self, config):
self.printer = config.get_printer()
self.reactor = self.printer.get_reactor()
@@ -502,7 +503,7 @@ class ToolHead:
res.update({ 'print_time': print_time,
'estimated_print_time': estimated_print_time,
'extruder': self.extruder.get_name(),
- 'position': homing.Coord(*self.commanded_pos),
+ 'position': self.Coord(*self.commanded_pos),
'max_velocity': self.max_velocity,
'max_accel': self.max_accel,
'max_accel_to_decel': self.requested_accel_to_decel,