From 7fd7853785715fac01879c14cf1e9eb6422b3409 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 13 Jun 2021 22:52:57 -0400 Subject: duplicate_pin_override: Debugging tool to permit multiple use pins Signed-off-by: Kevin O'Connor --- klippy/extras/duplicate_pin_override.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 klippy/extras/duplicate_pin_override.py (limited to 'klippy/extras/duplicate_pin_override.py') diff --git a/klippy/extras/duplicate_pin_override.py b/klippy/extras/duplicate_pin_override.py new file mode 100644 index 00000000..a769a65f --- /dev/null +++ b/klippy/extras/duplicate_pin_override.py @@ -0,0 +1,15 @@ +# Tool to disable config checks for duplicate pins +# +# Copyright (C) 2021 Kevin O'Connor +# +# 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.get('pins').split(','): + ppins.allow_multi_use_pin(pin_desc) + +def load_config(config): + return PrinterDupPinOverride(config) -- cgit v1.2.3-70-g09d2