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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-02-11 22:21:55 -05:00
parent 20d0936fa2
commit acb0b8f599
1 changed files with 4 additions and 2 deletions

View File

@ -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)