From 2f7ff778be600f0b224983471d08591113173e21 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 12 Mar 2021 10:30:17 +1100 Subject: [PATCH] HAL_ChibiOS: fixed bug in DMA resolver idsets can be empty for a peripheral --- libraries/AP_HAL_ChibiOS/hwdef/scripts/dma_resolver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/dma_resolver.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/dma_resolver.py index 7da4f99cfe..600820fa51 100755 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/dma_resolver.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/dma_resolver.py @@ -188,7 +188,7 @@ def generate_DMAMUX_map_mask(peripheral_list, channel_mask, noshare_list, dma_ex else: other = None - if other is not None and ii in idsets[other]: + if other is not None and other in idsets and ii in idsets[other]: if len(idsets[p]) >= len(idsets[other]) and len(idsets[other]) > 0: continue idsets[other].remove(ii)