waf: add rate loop config abstraction that allows code to be elided on non-copter builds

This commit is contained in:
Andy Piper 2024-08-07 16:56:16 +01:00 committed by Andrew Tridgell
parent ba6da82f07
commit 21106380b3
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,8 @@ def _vehicle_index(vehicle):
# note that AP_NavEKF3_core.h is needed for AP_NavEKF3_feature.h # note that AP_NavEKF3_core.h is needed for AP_NavEKF3_feature.h
_vehicle_macros = ['APM_BUILD_DIRECTORY', 'AP_BUILD_TARGET_NAME', _vehicle_macros = ['APM_BUILD_DIRECTORY', 'AP_BUILD_TARGET_NAME',
'APM_BUILD_TYPE', 'APM_BUILD_COPTER_OR_HELI', 'APM_BUILD_TYPE', 'APM_BUILD_COPTER_OR_HELI',
'AP_NavEKF3_core.h', 'lua_generated_bindings.h'] 'AP_NavEKF3_core.h', 'lua_generated_bindings.h',
'AP_InertialSensor_rate_config.h']
_macros_re = re.compile(r'\b(%s)\b' % '|'.join(_vehicle_macros)) _macros_re = re.compile(r'\b(%s)\b' % '|'.join(_vehicle_macros))
# some cpp files are not available at the time we run this check so need to be # some cpp files are not available at the time we run this check so need to be
@ -174,6 +175,7 @@ class ap_library_check_headers(Task.Task):
'libraries/AP_Scripting/lua_generated_bindings.h', 'libraries/AP_Scripting/lua_generated_bindings.h',
'libraries/AP_NavEKF3/AP_NavEKF3_feature.h', 'libraries/AP_NavEKF3/AP_NavEKF3_feature.h',
'libraries/AP_LandingGear/AP_LandingGear_config.h', 'libraries/AP_LandingGear/AP_LandingGear_config.h',
'libraries/AP_InertialSensor/AP_InertialSensor_rate_config.h',
) )
whitelist = tuple(os.path.join(*p.split('/')) for p in whitelist) whitelist = tuple(os.path.join(*p.split('/')) for p in whitelist)