diff --git a/libraries/Filter/AP_Filter.cpp b/libraries/Filter/AP_Filter.cpp index ce65bd61ff..3e2763141a 100644 --- a/libraries/Filter/AP_Filter.cpp +++ b/libraries/Filter/AP_Filter.cpp @@ -1,10 +1,12 @@ +#include "AP_Filter_config.h" + +#if AP_FILTER_ENABLED + #include "AP_Filter.h" #include #include #include -#if AP_FILTER_ENABLED && !APM_BUILD_TYPE(APM_BUILD_AP_Periph) - extern const AP_HAL::HAL& hal; const AP_Param::GroupInfo AP_Filters::var_info[] = { @@ -152,4 +154,4 @@ AP_Filters &filters() } -#endif // AP_FILTER_ENABLED && !APM_BUILD_TYPE(APM_BUILD_AP_Periph) +#endif // AP_FILTER_ENABLED diff --git a/libraries/Filter/AP_Filter_params.cpp b/libraries/Filter/AP_Filter_params.cpp index d13cb2477f..40412bae85 100644 --- a/libraries/Filter/AP_Filter_params.cpp +++ b/libraries/Filter/AP_Filter_params.cpp @@ -1,9 +1,11 @@ +#include "AP_Filter_config.h" + +#if AP_FILTER_ENABLED + #include "AP_Filter.h" #include #include -#if AP_FILTER_ENABLED && !APM_BUILD_TYPE(APM_BUILD_AP_Periph) - const AP_Param::GroupInfo AP_Filter_params::var_info[] = { // @Param: TYPE @@ -22,4 +24,4 @@ AP_Filter_params::AP_Filter_params() AP_Param::setup_object_defaults(this, var_info); } -#endif // AP_FILTER_ENABLED && !APM_BUILD_TYPE(APM_BUILD_AP_Periph) +#endif // AP_FILTER_ENABLED diff --git a/libraries/Filter/AP_NotchFilter_params.cpp b/libraries/Filter/AP_NotchFilter_params.cpp index 5927fef445..68769765dd 100644 --- a/libraries/Filter/AP_NotchFilter_params.cpp +++ b/libraries/Filter/AP_NotchFilter_params.cpp @@ -1,9 +1,11 @@ +#include "AP_Filter_config.h" + +#if AP_FILTER_ENABLED + #include "AP_Filter.h" #include #include -#if AP_FILTER_ENABLED && !APM_BUILD_TYPE(APM_BUILD_AP_Periph) - const AP_Param::GroupInfo AP_NotchFilter_params::var_info[] = { // @Param: NOTCH_FREQ @@ -50,4 +52,4 @@ bool AP_NotchFilter_params::setup_notch_filter(NotchFilterFloat& filter, float s return true; } -#endif // AP_FILTER_ENABLED && !APM_BUILD_TYPE(APM_BUILD_AP_Periph) +#endif // AP_FILTER_ENABLED