multi_pin: Use config.getlist() for pins config option

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-08-19 15:33:36 -04:00
parent e784c19a96
commit 92e1821423
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Virtual pin that propagates its changes to multiple output pins # Virtual pin that propagates its changes to multiple output pins
# #
# Copyright (C) 2017,2018 Kevin O'Connor <kevin@koconnor.net> # Copyright (C) 2017-2021 Kevin O'Connor <kevin@koconnor.net>
# #
# This file may be distributed under the terms of the GNU GPLv3 license. # This file may be distributed under the terms of the GNU GPLv3 license.
@ -13,7 +13,7 @@ class PrinterMultiPin:
except ppins.error: except ppins.error:
pass pass
self.pin_type = None self.pin_type = None
self.pin_list = [pin.strip() for pin in config.get('pins').split(',')] self.pin_list = config.getlist('pins')
self.mcu_pins = [] self.mcu_pins = []
def setup_pin(self, pin_type, pin_params): def setup_pin(self, pin_type, pin_params):
ppins = self.printer.lookup_object('pins') ppins = self.printer.lookup_object('pins')