2021-06-14 04:52:57 +02:00
|
|
|
# Tool to disable config checks for duplicate pins
|
|
|
|
#
|
|
|
|
# Copyright (C) 2021 Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
#
|
|
|
|
# This file may be distributed under the terms of the GNU GPLv3 license.
|
|
|
|
|
|
|
|
class PrinterDupPinOverride:
|
|
|
|
def __init__(self, config):
|
|
|
|
printer = config.get_printer()
|
|
|
|
ppins = printer.lookup_object('pins')
|
2021-08-19 21:30:16 +02:00
|
|
|
for pin_desc in config.getlist('pins'):
|
2021-06-14 04:52:57 +02:00
|
|
|
ppins.allow_multi_use_pin(pin_desc)
|
|
|
|
|
|
|
|
def load_config(config):
|
|
|
|
return PrinterDupPinOverride(config)
|