From d609753a6ae94a51290c13b6a80ecdfc22b5ed86 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 31 Mar 2021 22:14:15 -0400 Subject: [PATCH] gcode_move: Make sure to call reset_last_position() in _handle_ready() If reset_last_position() is invoked prior to the printer being "ready", then the transform may not be properly accounted for. Handle this by calling reset_last_position() when the printer becomes "ready". This should fix some "must home first" errors on extrude-only moves. Signed-off-by: Kevin O'Connor --- klippy/extras/gcode_move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/klippy/extras/gcode_move.py b/klippy/extras/gcode_move.py index 1b9a22b7e..306b4b35f 100644 --- a/klippy/extras/gcode_move.py +++ b/klippy/extras/gcode_move.py @@ -54,6 +54,7 @@ class GCodeMove: toolhead = self.printer.lookup_object('toolhead') self.move_with_transform = toolhead.move self.position_with_transform = toolhead.get_position + self.reset_last_position() def _handle_shutdown(self): if not self.is_printer_ready: return