diff --git a/ks_includes/printer.py b/ks_includes/printer.py index f2a7fd99..897f47c8 100644 --- a/ks_includes/printer.py +++ b/ks_includes/printer.py @@ -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): diff --git a/screen.py b/screen.py index c18f844c..81bf8144 100644 --- a/screen.py +++ b/screen.py @@ -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