printer: More debugs for state changes
This commit is contained in:
parent
c926184918
commit
fc074c350f
@ -100,6 +100,9 @@ class Printer:
|
||||
self.set_dev_stat(x, "temperature", d["temperature"])
|
||||
|
||||
if "webhooks" in data or "idle_timeout" in data or "pause_resume" in data or "print_stats" in data:
|
||||
logger.debug("Evaluating state: %s" % data)
|
||||
logger.debug("State info: %s %s %s" % (self.data['webhooks'], self.data['idle_timeout'],
|
||||
self.data['print_stats']))
|
||||
self.evaluate_state()
|
||||
|
||||
def evaluate_state(self):
|
||||
|
@ -421,10 +421,11 @@ class KlipperScreen(Gtk.Window):
|
||||
_ = self.lang.gettext
|
||||
|
||||
if action == "notify_klippy_disconnected":
|
||||
logger.debug("Received notify_klippy_disconnected")
|
||||
self.printer.change_state("disconnected")
|
||||
return
|
||||
elif action == "notify_klippy_ready":
|
||||
self.printer.change_state("ready")
|
||||
#elif action == "notify_klippy_ready":
|
||||
# self.printer.change_state("ready")
|
||||
elif action == "notify_status_update" and self.printer.get_state() != "shutdown":
|
||||
self.printer.process_update(data)
|
||||
elif action == "notify_filelist_changed":
|
||||
@ -437,6 +438,7 @@ class KlipperScreen(Gtk.Window):
|
||||
self.printer.process_power_update(data)
|
||||
elif self.printer.get_state() not in ["error","shutdown"] and action == "notify_gcode_response":
|
||||
if "Klipper state: Shutdown" in data:
|
||||
logger.debug("Shutdown in gcode response, changing state to shutdown")
|
||||
self.printer.change_state("shutdown")
|
||||
|
||||
if not (data.startswith("B:") and
|
||||
|
Loading…
x
Reference in New Issue
Block a user