From 3623d20479cb7ce1449901d801e68a46a922c96d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 1 Sep 2023 19:03:44 +1000 Subject: [PATCH] waf: enable CANARD_MULTI_IFACE on AP_Periph if more than one interface --- Tools/ardupilotwaf/chibios.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tools/ardupilotwaf/chibios.py b/Tools/ardupilotwaf/chibios.py index faf094c4fd..819b3474c5 100644 --- a/Tools/ardupilotwaf/chibios.py +++ b/Tools/ardupilotwaf/chibios.py @@ -578,6 +578,8 @@ def configure(cfg): load_env_vars(cfg.env) if env.HAL_NUM_CAN_IFACES and not env.AP_PERIPH: setup_canmgr_build(cfg) + if env.HAL_NUM_CAN_IFACES and env.AP_PERIPH and int(env.HAL_NUM_CAN_IFACES)>1 and not env.BOOTLOADER: + env.DEFINES += [ 'CANARD_MULTI_IFACE=1' ] setup_optimization(cfg.env) def generate_hwdef_h(env):