mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-07 23:17:37 -06:00
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>
This commit is contained in:
parent
5ebe8ce025
commit
bc80ed4e88
4 changed files with 30 additions and 5 deletions
|
@ -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),))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue