From 1ff3ee7a12f28c422b1e6a495ae1da20af26e324 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Fri, 22 Jul 2022 16:42:19 +0100 Subject: [PATCH] AP_HAL_ChibiOS: allow undef of SPI devices --- libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index 6a06440fe9..c67fe5ea5a 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -2671,6 +2671,9 @@ def process_line(line): bylabel.pop(u, '') alttype.pop(u, '') altlabel.pop(u, '') + for dev in spidev: + if u == dev[0]: + spidev.remove(dev) # also remove all occurences of defines in previous lines if any for line in alllines[:]: if line.startswith('define') and u == line.split()[1]: