gcode: Only call position_with_transform() when printer is ready

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-05-02 07:34:59 -04:00
parent b6ebf5cb09
commit 3aacc4d6a2
1 changed files with 2 additions and 1 deletions

View File

@ -189,7 +189,8 @@ class GCodeParser:
self.extrude_factor = 1.
self.base_position[3] = self.last_position[3]
def reset_last_position(self):
self.last_position = self.position_with_transform()
if self.is_printer_ready:
self.last_position = self.position_with_transform()
def _dump_debug(self):
out = []
out.append("Dumping gcode input %d blocks" % (