diff options
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r-- | klippy/klippy.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py index 7af2e9b8..92fe6363 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -6,6 +6,7 @@ # This file may be distributed under the terms of the GNU GPLv3 license. import sys, optparse, ConfigParser, logging, time, threading import gcode, toolhead, util, mcu, fan, heater, extruder, reactor, queuelogger +import msgproto message_startup = """ The klippy host software is attempting to connect. Please @@ -19,6 +20,15 @@ command to reload the config and restart the host software. Printer is halted """ +message_protocol_error = """ +This type of error is frequently caused by running an older +version of the firmware on the micro-controller (fix by +recompiling and flashing the firmware). +Once the underlying issue is corrected, use the "RESTART" +command to reload the config and restart the host software. +Protocol error connecting to printer +""" + message_mcu_connect_error = """ This is an unrecoverable error. Please manually restart the micro-controller and then issue the "RESTART" command to @@ -169,6 +179,10 @@ class Printer: logging.exception("Config error") self.state_message = "%s%s" % (str(e), message_restart) self.reactor.update_timer(self.stats_timer, self.reactor.NEVER) + except msgproto.error, e: + logging.exception("Protocol error") + self.state_message = "%s%s" % (str(e), message_protocol_error) + self.reactor.update_timer(self.stats_timer, self.reactor.NEVER) except mcu.error, e: logging.exception("MCU error during connect") self.state_message = "%s%s" % (str(e), message_mcu_connect_error) |