From bdc48d37a842eecb2ef15c7fadde10a92c3209e3 Mon Sep 17 00:00:00 2001 From: Alfredo Monclus Date: Tue, 21 May 2024 18:40:14 -0300 Subject: [PATCH] pins: add pwm_tool --- ks_includes/printer.py | 3 +++ panels/pins.py | 2 +- screen.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ks_includes/printer.py b/ks_includes/printer.py index 70c62738..78c71cd1 100644 --- a/ks_includes/printer.py +++ b/ks_includes/printer.py @@ -197,6 +197,9 @@ class Printer: fans.extend(iter(self.get_config_section_list(f"{fan_type} "))) return fans + def get_pwm_tools(self): + return self.get_config_section_list("pwm_tool ") + def get_output_pins(self): return self.get_config_section_list("output_pin ") diff --git a/panels/pins.py b/panels/pins.py index 6f641994..494662d0 100644 --- a/panels/pins.py +++ b/panels/pins.py @@ -23,7 +23,7 @@ class Panel(ScreenPanel): self.content.add(scroll) def load_pins(self): - output_pins = self._printer.get_output_pins() + output_pins = self._printer.get_pwm_tools() + self._printer.get_output_pins() for pin in output_pins: # Support for hiding devices by name name = pin.split()[1] diff --git a/screen.py b/screen.py index 211e683e..3b1acbad 100755 --- a/screen.py +++ b/screen.py @@ -282,7 +282,7 @@ class KlipperScreen(Gtk.Window): requested_updates['objects'][f] = ["speed"] for f in self.printer.get_filament_sensors(): requested_updates['objects'][f] = ["enabled", "filament_detected"] - for p in self.printer.get_output_pins(): + for p in self.printer.get_pwm_tools() + self.printer.get_output_pins(): requested_updates['objects'][p] = ["value"] for led in self.printer.get_leds(): requested_updates['objects'][led] = ["color_data"]