Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Aug 15, 2024
1 parent ea1f05c commit 558da59
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions Tools/autotest/test_build_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,24 +314,21 @@ def define_is_whitelisted_for_feature_in_code(self, target, define):
if target.lower() not in frozenset(["copter", "rover"]):
feature_define_whitelist.add('HAL_SPRAYER_ENABLED')
feature_define_whitelist.add('HAL_PROXIMITY_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_CYGBOT_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_DRONECAN_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_LIGHTWARE_SF40C_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_LIGHTWARE_SF45B_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_MAV_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_RANGEFINDER_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_RPLIDARA2_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_TERARANGERTOWER_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_TERARANGERTOWEREVO_ENABLED')
feature_define_whitelist.add('AP_PROXIMITY_.*_ENABLED')
feature_define_whitelist.add('AP_OAPATHPLANNER_ENABLED')
feature_define_whitelist.add('AP_MOTORS_FRAME_DODECAHEXA_ENABLED')
feature_define_whitelist.add('AP_MOTORS_FRAME_DECA_ENABLED')
feature_define_whitelist.add('AP_MOTORS_FRAME_HEXA_ENABLED')
feature_define_whitelist.add('AP_MOTORS_FRAME_OCTA_ENABLED')
feature_define_whitelist.add('AP_MOTORS_FRAME_QUAD_ENABLED')
feature_define_whitelist.add('AP_MOTORS_FRAME_OCTAQUAD_ENABLED')
feature_define_whitelist.add('AP_MOTORS_FRAME_Y6_ENABLED')
return define in feature_define_whitelist
feature_define_whitelist.add('AP_MOTORS_FRAME_.*_ENABLED')

if target.lower() in ["blimp", "antennatracker"]:
# no airspeed on blimp/tracker
feature_define_whitelist.add(r'AP_AIRSPEED_.*_ENABLED')

if target.lower() in ["blimp", "antennatracker", "sub"]:
# no OSD on Sub/blimp/tracker
feature_define_whitelist.add(r'OSD_ENABLED')

for some_re in feature_define_whitelist:
if re.match(some_re, define):
return True

def assert_feature_in_code(self, defines, feature):
# if the feature is truly disabled then extract_features.py
Expand Down

0 comments on commit 558da59

Please sign in to comment.