forked from CreatBot/CreatBotKlipperScreen
base_panel: cleanup logging
This commit is contained in:
@@ -184,7 +184,6 @@ class BasePanel(ScreenPanel):
|
|||||||
|
|
||||||
# Options in the config have priority
|
# Options in the config have priority
|
||||||
printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
|
printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
|
||||||
logging.info("printer_cfg: %s", printer_cfg)
|
|
||||||
if printer_cfg is not None:
|
if printer_cfg is not None:
|
||||||
titlebar_items = printer_cfg.get("titlebar_items", "")
|
titlebar_items = printer_cfg.get("titlebar_items", "")
|
||||||
if titlebar_items is not None:
|
if titlebar_items is not None:
|
||||||
@@ -252,7 +251,8 @@ class BasePanel(ScreenPanel):
|
|||||||
name = device.split(" ")[1:][0].capitalize().replace("_", " ") + ": "
|
name = device.split(" ")[1:][0].capitalize().replace("_", " ") + ": "
|
||||||
elif self.titlebar_name_type == "short":
|
elif self.titlebar_name_type == "short":
|
||||||
name = device.split(" ")[1:][0][:1].upper() + ": "
|
name = device.split(" ")[1:][0][:1].upper() + ": "
|
||||||
self.labels[device].set_label("%s%d°" % (name, round(self._printer.get_dev_stat(device, "temperature"))))
|
self.labels[device].set_label("%s%d°" % (name,
|
||||||
|
round(self._printer.get_dev_stat(device, "temperature"))))
|
||||||
|
|
||||||
if "toolhead" in data and "extruder" in data["toolhead"]:
|
if "toolhead" in data and "extruder" in data["toolhead"]:
|
||||||
if data["toolhead"]["extruder"] != self.current_extruder:
|
if data["toolhead"]["extruder"] != self.current_extruder:
|
||||||
|
@@ -154,7 +154,6 @@ class SettingsPanel(ScreenPanel):
|
|||||||
option['callback'] if "callback" in option else None)
|
option['callback'] if "callback" in option else None)
|
||||||
dropdown.set_entry_text_column(0)
|
dropdown.set_entry_text_column(0)
|
||||||
dev.add(dropdown)
|
dev.add(dropdown)
|
||||||
logging.debug("Children: %s" % dropdown.get_children())
|
|
||||||
elif option['type'] == "scale":
|
elif option['type'] == "scale":
|
||||||
val = int(self._config.get_config().get(option['section'], opt_name, fallback=option['value']))
|
val = int(self._config.get_config().get(option['section'], opt_name, fallback=option['value']))
|
||||||
adj = Gtk.Adjustment(val, option['range'][0], option['range'][1], option['step'], option['step']*5)
|
adj = Gtk.Adjustment(val, option['range'][0], option['range'][1], option['step'], option['step']*5)
|
||||||
|
Reference in New Issue
Block a user