aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/klippy.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-11-30 19:31:46 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-11-30 21:20:09 -0500
commitbc80ed4e88656ec4dd599a11152d40ee7f18d40a (patch)
treee664b0dde757d9c62b982d42bc6ff960c35a6904 /klippy/klippy.py
parent5ebe8ce0259443b4f5924ed019b305627f73bc7c (diff)
downloadkutter-bc80ed4e88656ec4dd599a11152d40ee7f18d40a.tar.gz
kutter-bc80ed4e88656ec4dd599a11152d40ee7f18d40a.tar.xz
kutter-bc80ed4e88656ec4dd599a11152d40ee7f18d40a.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r--klippy/klippy.py4
1 files changed, 4 insertions, 0 deletions
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()
######################################################################