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>
This commit is contained in:
Kevin O'Connor 2021-03-31 22:14:15 -04:00
parent 3390088d3a
commit d609753a6a
1 changed files with 1 additions and 0 deletions

View File

@ -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