gcode: Add a "command_error" event notifier

Allow other modules to be notified if there is a gcode command error
detected.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-02-12 13:20:12 -05:00 committed by KevinOConnor
parent 1aa11fed8c
commit 5bca4e6fa1
1 changed files with 1 additions and 0 deletions

View File

@ -235,6 +235,7 @@ class GCodeParser:
except self.error as e: except self.error as e:
self.respond_error(str(e)) self.respond_error(str(e))
self.reset_last_position() self.reset_last_position()
self.printer.send_event("gcode:command_error")
if not need_ack: if not need_ack:
raise raise
except: except: