Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeanon committed Feb 2, 2025
1 parent 8430737 commit c8c30b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
10 changes: 3 additions & 7 deletions ks_includes/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def log_counts(self, printer_info):
logging.info(f"# Fans: {self.fancount}")
logging.info(f"# Output pins: {self.output_pin_count}")
logging.info(f"# PWM tools: {self.pwm_tools_count}")
logging.info(f"# PWM cycle_times: {self.pwm_cycle_times_count}")
logging.info(f"# Leds: {self.ledcount}")

def stop_tempstore_updates(self):
Expand All @@ -123,8 +124,6 @@ def process_update(self, data):
return

for x in data:
if x.startswith("pwm_tool"):
logging.info(x)
if x == "configfile":
if 'config' in data[x]:
self.config.update(data[x]['config'])
Expand Down Expand Up @@ -360,18 +359,15 @@ def get_fan_speed(self, fan="fan"):
return speed

def get_pin_value(self, pin):
for x in self.data:
logging.info(x)
if pin in self.data:
logging.info("Pin in data")
logging.info(f"Pin {pin} in data")
return self.data[pin]["value"]
elif pin in self.config and 'value' in self.config[pin]:
logging.info("Pin in config")
logging.info(f"Pin {pin} in data")
return self.config[pin]["value"]
return 0

def get_pin_scale(self, pin):
logging.info(pin)
if pin in self.config and 'scale' in self.config[pin]:
return float(self.config[pin]['scale'])
return 1.0
Expand Down
1 change: 0 additions & 1 deletion panels/pins.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def set_output_pin(self, widget, event, pin):
GLib.timeout_add_seconds(1, self.check_pin_value, pin, widget)

def check_pin_value(self, pin, widget=None):
logging.info(f"PIN: {pin}")
self.update_pin_value(None, pin, self._printer.get_pin_value(pin))
if widget and isinstance(widget, Gtk.Switch):
widget.set_sensitive(True)
Expand Down
2 changes: 0 additions & 2 deletions screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,6 @@ def reload_panels(self, *args):
self.show_panel(home)

def _websocket_callback(self, action, data):
if "output_pin _BEEPER" in data:
logging.info(f"Output pin in data: {'pwm_tool LED-Bars' in data}")
if self.connecting:
logging.debug("Not connected")
return
Expand Down

0 comments on commit c8c30b6

Please sign in to comment.