From bc80ed4e88656ec4dd599a11152d40ee7f18d40a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 30 Nov 2016 19:31:46 -0500 Subject: mcu: Detect if the communication channel to the firmware is lost Detect a comms loss and report it to the user. Signed-off-by: Kevin O'Connor --- klippy/klippy.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'klippy/klippy.py') diff --git a/klippy/klippy.py b/klippy/klippy.py index 0dbc8f60..25f6b99b 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -184,6 +184,10 @@ class Printer: self.state_message = "Firmware shutdown: %s%s" % ( msg, message_shutdown) self.gcode.set_printer_ready(False) + def note_mcu_error(self, msg): + self.state_message = "%s%s" % (msg, message_restart) + self.gcode.set_printer_ready(False) + self.gcode.note_mcu_error() ###################################################################### -- cgit v1.2.3-70-g09d2