aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/duplicate_pin_override.py
blob: 2cd633631e2e9c04136afa09e94b77f834079158 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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")
        for pin_desc in config.getlist("pins"):
            ppins.allow_multi_use_pin(pin_desc)


def load_config(config):
    return PrinterDupPinOverride(config)