Tools: add build_options.py option to remove fencepoint protocol

also gate more code on defines

Saves ~2kB
This commit is contained in:
Peter Barker 2023-08-07 15:38:55 +10:00 committed by Andrew Tridgell
parent 77b8c96eae
commit dd388a3da2
2 changed files with 2 additions and 0 deletions

View File

@ -287,6 +287,7 @@ BUILD_OPTIONS = [
Feature('Other', 'BOOTLOADER_FLASHING', 'AP_BOOTLOADER_FLASHING_ENABLED', 'Enable Bootloader flashing', 0, "FILESYSTEM_ROMFS"), # noqa
Feature('Other', 'SCRIPTING', 'AP_SCRIPTING_ENABLED', 'Enable LUA Scripting', 0, None),
Feature('Other', 'SLCAN', 'AP_CAN_SLCAN_ENABLED', 'Enable SLCAN serial protocol', 0, None),
Feature('Other', 'FENCEPOINT_PROTOCOL', 'AC_POLYFENCE_FENCE_POINT_PROTOCOL_SUPPORT', 'Enable old MAVLink FencePoint protocol', 0, None), # noqa
Feature('Developer', 'KILL_IMU', 'AP_INERTIALSENSOR_KILL_IMU_ENABLED', 'Allow IMUs to be disabled at runtime', 0, None),
Feature('Developer', 'CRASHCATCHER', 'AP_CRASHDUMP_ENABLED', 'Enable CrashCatcher', 0, None),

View File

@ -200,6 +200,7 @@ class ExtractFeatures(object):
('AP_INERTIALSENSOR_KILL_IMU_ENABLED', r'AP_InertialSensor::kill_imu'),
('AP_CRASHDUMP_ENABLED', 'CrashCatcher_DumpMemory'),
('AP_CAN_SLCAN_ENABLED', 'SLCAN::CANIface::var_info'),
('AC_POLYFENCE_FENCE_POINT_PROTOCOL_SUPPORT', 'AC_PolyFence_loader::handle_msg_fetch_fence_point'),
]
def progress(self, msg):