From 6ecb18e02765a4a9ea86b86aeaadeef2e47f7cc2 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Fri, 20 Oct 2023 13:31:40 +0100 Subject: [PATCH] AP_Vehicle: link in AP_Filter support allow filters to be compiled out add filter updates at 1Hz --- libraries/AP_Vehicle/AP_Vehicle.cpp | 12 ++++++++++++ libraries/AP_Vehicle/AP_Vehicle.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index 9a4f702a2d..b04cc282fc 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -241,6 +241,11 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = { #endif #endif // AP_NETWORKING_ENABLED +#if AP_FILTER_ENABLED + // @Group: FILT + // @Path: ../Filter/AP_Filter.cpp + AP_SUBGROUPINFO(filters, "FILT", 26, AP_Vehicle, AP_Filters), +#endif AP_GROUPEND }; @@ -419,6 +424,10 @@ void AP_Vehicle::setup() custom_rotations.init(); +#if AP_FILTER_ENABLED + filters.init(); +#endif + #if HAL_WITH_ESC_TELEM && HAL_GYROFFT_ENABLED for (uint8_t i = 0; i #include #include +#include class AP_DDS_Client; @@ -469,6 +470,9 @@ private: uint32_t _last_internal_errors; // backup of AP_InternalError::internal_errors bitmask AP_CustomRotations custom_rotations; +#if AP_FILTER_ENABLED + AP_Filters filters; +#endif // Bitmask of modes to disable from gcs AP_Int32 flight_mode_GCS_block;