From c0daf43d2f52f5fbfc94f2be4040087e8bace989 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 15 Aug 2020 17:33:48 -0400 Subject: [PATCH] gcode: Convert get_status() homing_xpos to use a namedtuple Signed-off-by: Kevin O'Connor --- klippy/extras/display/menu.cfg | 2 +- klippy/gcode.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/klippy/extras/display/menu.cfg b/klippy/extras/display/menu.cfg index c1ac2d69..8ac61c4e 100644 --- a/klippy/extras/display/menu.cfg +++ b/klippy/extras/display/menu.cfg @@ -118,7 +118,7 @@ gcode: [menu __main __tune __offsetz] type: input name: Offset Z:{'%05.3f' % menu.input} -input: {printer.gcode.homing_zpos} +input: {printer.gcode.homing_origin.z} input_min: -5 input_max: 5 input_step: 0.005 diff --git a/klippy/gcode.py b/klippy/gcode.py index 02e9def5..579a7c64 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -191,9 +191,7 @@ class GCodeParser: 'base_ypos': self.base_position[1], 'base_zpos': self.base_position[2], 'base_epos': self.base_position[3], - 'homing_xpos': self.homing_position[0], - 'homing_ypos': self.homing_position[1], - 'homing_zpos': self.homing_position[2], + 'homing_origin': homing.Coord(*self.homing_position), 'gcode_position': homing.Coord(*move_position), } def dump_state(self):