From 0da4e3c9f30c9f80430ca2986f8a752e3ee4a2f4 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 3 May 2023 23:08:00 +1000 Subject: [PATCH] Tools: add and use AP_RCPROTOCOL_ENABLED --- Tools/ardupilotwaf/boards.py | 1 + Tools/scripts/build_options.py | 9 +++++---- Tools/scripts/extract_features.py | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index df6a2a4e07..195c00600a 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -794,6 +794,7 @@ class sitl_periph_gps(sitl): HAL_RALLY_ENABLED = 0, AP_SCHEDULER_ENABLED = 0, CANARD_ENABLE_TAO_OPTION = 1, + AP_RCPROTOCOL_ENABLED = 0, CANARD_ENABLE_CANFD = 1, CANARD_MULTI_IFACE = 1, HAL_CANMANAGER_ENABLED = 0, diff --git a/Tools/scripts/build_options.py b/Tools/scripts/build_options.py index d482b7f55f..e7e5d6b8d2 100644 --- a/Tools/scripts/build_options.py +++ b/Tools/scripts/build_options.py @@ -176,10 +176,11 @@ BUILD_OPTIONS = [ Feature('Plane', 'DEEPSTALL', 'HAL_LANDING_DEEPSTALL_ENABLED', 'Enable Deepstall Landing', 0, None), Feature('Plane', 'QAUTOTUNE', 'QAUTOTUNE_ENABLED', 'Enable QuadPlane Autotune mode', 0, "QUADPLANE"), - Feature('RC', 'RC_CRSF', 'AP_RCPROTOCOL_CRSF_ENABLED', "Enable CRSF RC Protocol", 0, None), # NOQA: E501 - Feature('RC', 'RC_SBUS', 'AP_RCPROTOCOL_SBUS_ENABLED', "Enable SBUS Protocol", 0, None), # NOQA: E501 - Feature('RC', 'RC_SRXL', 'AP_RCPROTOCOL_SRXL_ENABLED', "Enable SRXL RC Protocol", 0, None), # NOQA: E501 - Feature('RC', 'RC_SRXL2', 'AP_RCPROTOCOL_SRXL2_ENABLED', "Enable SRXL2 RC Protocol", 0, None), # NOQA: E501 + Feature('RC', 'RC_Protocol', 'AP_RCPROTOCOL_ENABLED', "Enable Serial RC Protocol support", 0, None), # NOQA: E501 + Feature('RC', 'RC_CRSF', 'AP_RCPROTOCOL_CRSF_ENABLED', "Enable CRSF RC Protocol", 0, "RC_Protocol"), # NOQA: E501 + Feature('RC', 'RC_SBUS', 'AP_RCPROTOCOL_SBUS_ENABLED', "Enable SBUS Protocol", 0, "RC_Protocol"), # NOQA: E501 + Feature('RC', 'RC_SRXL', 'AP_RCPROTOCOL_SRXL_ENABLED', "Enable SRXL RC Protocol", 0, "RC_Protocol"), # NOQA: E501 + Feature('RC', 'RC_SRXL2', 'AP_RCPROTOCOL_SRXL2_ENABLED', "Enable SRXL2 RC Protocol", 0, "RC_Protocol"), # NOQA: E501 Feature('Rangefinder', 'RANGEFINDER', 'AP_RANGEFINDER_ENABLED', "Enable Rangefinders", 0, None), # NOQA: E501 Feature('Rangefinder', 'RANGEFINDER_ANALOG', 'AP_RANGEFINDER_ANALOG_ENABLED', "Enable Rangefinder - Analog", 0, "RANGEFINDER"), # NOQA: E501 diff --git a/Tools/scripts/extract_features.py b/Tools/scripts/extract_features.py index b7af44b05d..2c1da0035c 100755 --- a/Tools/scripts/extract_features.py +++ b/Tools/scripts/extract_features.py @@ -153,6 +153,7 @@ class ExtractFeatures(object): ('AP_LANDINGGEAR_ENABLED', r'AP_LandingGear::init\b',), ('AP_WINCH_ENABLED', 'AP_Winch::AP_Winch',), + ('AP_RCPROTOCOL_ENABLED', r'AP_RCProtocol::init\b',), ('AP_RCPROTOCOL_{type}_ENABLED', r'AP_RCProtocol_(?P.*)::_process_byte\b',), ('AP_RCPROTOCOL_{type}_ENABLED', r'AP_RCProtocol_(?P.*)::_process_pulse\b',),