aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/gcode.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/gcode.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/gcode.py')
-rw-r--r--klippy/gcode.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py
index d607a0cc..5b1d8904 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -72,6 +72,13 @@ class GCodeParser:
self.build_handlers()
if is_ready and self.is_fileinput and self.fd_handle is None:
self.fd_handle = self.reactor.register_fd(self.fd, self.process_data)
+ def note_mcu_error(self):
+ if self.toolhead is not None:
+ self.toolhead.motor_off()
+ if self.heater_nozzle is not None:
+ self.heater_nozzle.set_temp(0., 0.)
+ if self.heater_bed is not None:
+ self.heater_bed.set_temp(0., 0.)
def dump_debug(self):
logging.info("Dumping gcode input %d blocks" % (
len(self.input_log),))