mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-12-16 05:09:56 +01:00
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 <kevin@koconnor.net>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user