mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-13 09:48:00 -06:00
pins: Simplify pin map alias setup
Use map_pins() to obtain the pin mapping - don't export mcu_to_pins(). The functionality of mcu_to_pins() can be obtained by calling map_pins() with name=None. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
0f2478b62f
commit
8e6d5efdac
3 changed files with 23 additions and 29 deletions
|
@ -357,6 +357,7 @@ class MCU:
|
|||
self._config_cmds = []
|
||||
self._config_crc = None
|
||||
self._init_callbacks = []
|
||||
self._pin_map = config.get('pin_map', None)
|
||||
# Move command queuing
|
||||
ffi_main, self.ffi_lib = chelper.get_ffi()
|
||||
self._steppers = []
|
||||
|
@ -456,11 +457,7 @@ class MCU:
|
|||
|
||||
# Resolve pin names
|
||||
mcu = self.serial.msgparser.get_constant('MCU')
|
||||
pin_map = self._config.get('pin_map', None)
|
||||
if pin_map is None:
|
||||
pnames = pins.mcu_to_pins(mcu)
|
||||
else:
|
||||
pnames = pins.map_pins(pin_map, mcu)
|
||||
pnames = pins.get_pin_map(mcu, self._pin_map)
|
||||
updated_cmds = []
|
||||
for cmd in self._config_cmds:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue