aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/gcode.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-10-11 15:10:19 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-10-11 15:10:19 -0400
commit3809e4c0552e44ca0c30d2f848d78181180150d3 (patch)
tree314fe147ebf9b48c177975509571d2a713a32c5c /klippy/gcode.py
parent7f8a94ff48cd54513eb95ba1f6977c19b49442e6 (diff)
downloadkutter-3809e4c0552e44ca0c30d2f848d78181180150d3.tar.gz
kutter-3809e4c0552e44ca0c30d2f848d78181180150d3.tar.xz
kutter-3809e4c0552e44ca0c30d2f848d78181180150d3.zip
gcode: Reset current position after an endstop error
If the printer is commanded to an invalid location, reset the current position to the last successfully commanded position. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/gcode.py')
-rw-r--r--klippy/gcode.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py
index 4e7c9af5..9902ec4c 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -228,6 +228,7 @@ class GCodeParser:
self.toolhead.move(self.last_position, self.speed, sloppy)
except homing.EndstopError, e:
self.respond("Error: %s" % (e,))
+ self.last_position = self.toolhead.get_position()
def cmd_G4(self, params):
# Dwell
if 'S' in params: