From ac6cab9168c48a62770622850e0fab5057d32d20 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 9 Oct 2025 21:43:59 -0400 Subject: [PATCH] gcode_move: Export extra axes in status reference Change "homing_origin" and "position" to support more than 4 components. Export a new "axis_map" value to describe the contents at each component index. Signed-off-by: Kevin O'Connor --- klippy/extras/gcode_move.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/klippy/extras/gcode_move.py b/klippy/extras/gcode_move.py index 21174a904..c2b307663 100644 --- a/klippy/extras/gcode_move.py +++ b/klippy/extras/gcode_move.py @@ -107,9 +107,10 @@ class GCodeMove: 'extrude_factor': self.extrude_factor, 'absolute_coordinates': self.absolute_coord, 'absolute_extrude': self.absolute_extrude, - 'homing_origin': self.Coord(self.homing_position[:4]), - 'position': self.Coord(self.last_position[:4]), + 'homing_origin': self.Coord(self.homing_position), + 'position': self.Coord(self.last_position), 'gcode_position': self.Coord(move_position), + 'axis_map': self.axis_map, } def reset_last_position(self): if self.is_printer_ready: @@ -122,7 +123,8 @@ class GCodeMove: if ea is None: continue gcode_id = ea.get_axis_gcode_id() - if gcode_id is None or gcode_id in axis_map or gcode_id in "FN": + if (gcode_id is None or len(gcode_id) != 1 or not gcode_id.isupper() + or gcode_id in axis_map or gcode_id in "FN"): continue axis_map[gcode_id] = index self.axis_map = axis_map