aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/static_digital_output.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras/static_digital_output.py')
-rw-r--r--klippy/extras/static_digital_output.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/klippy/extras/static_digital_output.py b/klippy/extras/static_digital_output.py
index 2fa0bb3f..8c39fb3c 100644
--- a/klippy/extras/static_digital_output.py
+++ b/klippy/extras/static_digital_output.py
@@ -4,16 +4,20 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
+
class PrinterStaticDigitalOut:
def __init__(self, config):
printer = config.get_printer()
- ppins = printer.lookup_object('pins')
- pin_list = config.getlist('pins')
+ ppins = printer.lookup_object("pins")
+ pin_list = config.getlist("pins")
for pin_desc in pin_list:
pin_params = ppins.lookup_pin(pin_desc, can_invert=True)
- mcu = pin_params['chip']
- mcu.add_config_cmd("set_digital_out pin=%s value=%d"
- % (pin_params['pin'], not pin_params['invert']))
+ mcu = pin_params["chip"]
+ mcu.add_config_cmd(
+ "set_digital_out pin=%s value=%d"
+ % (pin_params["pin"], not pin_params["invert"])
+ )
+
def load_config_prefix(config):
return PrinterStaticDigitalOut(config)