From 6e88320d625ae80e4b4b87c75ba5540b9f4da146 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 28 May 2019 17:40:19 -0400 Subject: gcode: "gcode_position" and toolhead "position" as get_status() named tuple Add "gcode_position" named tuple to gcode.get_status(). Add a "position" named tuple to toolhead.get_status(). Signed-off-by: Kevin O'Connor --- klippy/homing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'klippy/homing.py') diff --git a/klippy/homing.py b/klippy/homing.py index ea8967b4..f6f7e5d8 100644 --- a/klippy/homing.py +++ b/klippy/homing.py @@ -1,9 +1,9 @@ # Code for state tracking during homing operations # -# Copyright (C) 2016,2017 Kevin O'Connor +# Copyright (C) 2016-2019 Kevin O'Connor # # This file may be distributed under the terms of the GNU GPLv3 license. -import logging, math +import logging, math, collections HOMING_STEP_DELAY = 0.00000025 HOMING_START_DELAY = 0.001 @@ -152,3 +152,5 @@ class EndstopError(Exception): def EndstopMoveError(pos, msg="Move out of range"): return EndstopError("%s: %.3f %.3f %.3f [%.3f]" % ( msg, pos[0], pos[1], pos[2], pos[3])) + +Coord = collections.namedtuple('Coord', ('x', 'y', 'z', 'e')) -- cgit v1.2.3-70-g09d2