aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/gcode_move.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-03-31 22:14:15 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-03-31 22:15:54 -0400
commitd609753a6ae94a51290c13b6a80ecdfc22b5ed86 (patch)
treed5246b1b6896fe739ac2d1a0c8df7addb674a7e8 /klippy/extras/gcode_move.py
parent3390088d3a0e4ed9e1bd6c70b6cf1e51dd7909c3 (diff)
downloadkutter-d609753a6ae94a51290c13b6a80ecdfc22b5ed86.tar.gz
kutter-d609753a6ae94a51290c13b6a80ecdfc22b5ed86.tar.xz
kutter-d609753a6ae94a51290c13b6a80ecdfc22b5ed86.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/gcode_move.py')
-rw-r--r--klippy/extras/gcode_move.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/klippy/extras/gcode_move.py b/klippy/extras/gcode_move.py
index 1b9a22b7..306b4b35 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