mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-13 09:48:00 -06:00
duplicate_pin_override: Debugging tool to permit multiple use pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
4d559633e3
commit
7fd7853785
3 changed files with 41 additions and 3 deletions
15
klippy/extras/duplicate_pin_override.py
Normal file
15
klippy/extras/duplicate_pin_override.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
# 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.get('pins').split(','):
|
||||
ppins.allow_multi_use_pin(pin_desc)
|
||||
|
||||
def load_config(config):
|
||||
return PrinterDupPinOverride(config)
|
Loading…
Add table
Add a link
Reference in a new issue