Tools: waf: don't do uavcan build config for AP_Periph

This commit is contained in:
Siddharth Purohit 2020-07-30 23:19:01 +05:30 committed by Peter Barker
parent b6f92989a7
commit b27092c651
1 changed files with 5 additions and 5 deletions

View File

@ -237,9 +237,9 @@ def chibios_firmware(self):
_upload_task = self.create_task('upload_fw', src=apj_target)
_upload_task.set_run_after(generate_apj_task)
def setup_can_build(cfg):
'''enable CAN build. By doing this here we can auto-enable CAN in
the build based on the presence of CAN pins in hwdef.dat'''
def setup_canmgr_build(cfg):
'''enable CANManager build. By doing this here we can auto-enable CAN in
the build based on the presence of CAN pins in hwdef.dat except for AP_Periph builds'''
env = cfg.env
env.AP_LIBRARIES += [
'AP_UAVCAN',
@ -358,8 +358,8 @@ def configure(cfg):
if ret != 0:
cfg.fatal("Failed to process hwdef.dat ret=%d" % ret)
load_env_vars(cfg.env)
if env.HAL_NUM_CAN_IFACES:
setup_can_build(cfg)
if env.HAL_NUM_CAN_IFACES and not env.AP_PERIPH:
setup_canmgr_build(cfg)
setup_optimization(cfg.env)
def generate_hwdef_h(env):