From acb0b8f59967ff03e0b6eb1a98379eaaf1e27126 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 11 Feb 2017 22:21:55 -0500 Subject: [PATCH] klippy: Fix omission causing gcode dump to not function Fix bug that broke the gcode command dump after a shutdown. Signed-off-by: Kevin O'Connor --- klippy/klippy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/klippy/klippy.py b/klippy/klippy.py index eac85829..216aff7b 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -8,6 +8,8 @@ import sys, optparse, ConfigParser, logging, time, threading import gcode, toolhead, util, mcu, fan, heater, extruder, reactor, queuelogger import msgproto +message_ready = "Printer is ready" + message_startup = """ The klippy host software is attempting to connect. Please retry in a few moments. @@ -174,7 +176,7 @@ class Printer: self.build_config() self.validate_config() self.gcode.set_printer_ready(True) - self.state_message = "Printer is ready" + self.state_message = message_ready except ConfigParser.Error, e: logging.exception("Config error") self.state_message = "%s%s" % (str(e), message_restart) @@ -208,7 +210,7 @@ class Printer: def get_state_message(self): return self.state_message def note_shutdown(self, msg): - if self.state_message == 'Running': + if self.state_message == message_ready: self.need_dump_debug = True self.state_message = "Firmware shutdown: %s%s" % ( msg, message_shutdown)