diff --git a/ks_includes/printer.py b/ks_includes/printer.py index 4fcf5d96..2dcebddc 100644 --- a/ks_includes/printer.py +++ b/ks_includes/printer.py @@ -20,6 +20,10 @@ class Printer: "shutdown": None } tools = [] + toolcount = 0 + extrudercount = 0 + tempdevcount = 0 + fancount = 0 def __init__(self, printer_info, data, state_execute_cb): self.state = "disconnected" @@ -176,9 +180,6 @@ class Printer: } logging.debug("Power devices: %s" % self.power_devices) - def config_section_exists(self, section): - return section in list(self.config) - def get_config_section_list(self, search=""): if not hasattr(self, "config"): return [] @@ -232,7 +233,7 @@ class Printer: "fans": { "count": self.fancount }, - "bltouch": self.section_exists("bltouch"), + "bltouch": self.config_section_exists("bltouch"), "gcode_macros": { "count": len(self.get_gcode_macros()) }, @@ -241,7 +242,7 @@ class Printer: "power_devices": { "count": len(self.get_power_devices()) }, - "probe": self.section_exists("probe") + "probe": self.config_section_exists("probe") } } @@ -340,7 +341,7 @@ class Printer: self.tempstore[dev]["temperatures"] = result[dev]["temperatures"] logging.info("Temp store: %s" % list(self.tempstore)) - def section_exists(self, section): + def config_section_exists(self, section): if section in self.get_config_section_list(): return True return False diff --git a/panels/system.py b/panels/system.py index 7fd35c63..4ae51963 100644 --- a/panels/system.py +++ b/panels/system.py @@ -38,24 +38,6 @@ class SystemPanel(ScreenPanel): _("Are you sure you wish to shutdown the system?"), "machine.shutdown") shutdown.set_vexpand(False) - info = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) - info.set_vexpand(True) - info.set_valign(Gtk.Align.CENTER) - - self.labels['loadavg'] = Gtk.Label("temp") - - self.labels['klipper_version'] = Gtk.Label( - _("Klipper Version") + - (": %s" % self._screen.printer.get_klipper_version())) - self.labels['klipper_version'].set_margin_top(15) - - self.labels['ks_version'] = Gtk.Label(_("KlipperScreen Version") + (": %s" % self._screen.version)) - self.labels['ks_version'].set_margin_top(15) - - info.add(self.labels['loadavg']) - info.add(self.labels['klipper_version']) - info.add(self.labels['ks_version']) - scroll = Gtk.ScrolledWindow() scroll.set_property("overlay-scrolling", False) scroll.set_vexpand(True)