mirror of https://github.com/Desuuuu/klipper.git
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>
This commit is contained in:
parent
7f8a94ff48
commit
3809e4c055
|
@ -228,6 +228,7 @@ class GCodeParser:
|
||||||
self.toolhead.move(self.last_position, self.speed, sloppy)
|
self.toolhead.move(self.last_position, self.speed, sloppy)
|
||||||
except homing.EndstopError, e:
|
except homing.EndstopError, e:
|
||||||
self.respond("Error: %s" % (e,))
|
self.respond("Error: %s" % (e,))
|
||||||
|
self.last_position = self.toolhead.get_position()
|
||||||
def cmd_G4(self, params):
|
def cmd_G4(self, params):
|
||||||
# Dwell
|
# Dwell
|
||||||
if 'S' in params:
|
if 'S' in params:
|
||||||
|
|
Loading…
Reference in New Issue