From 9e3a29bf86d020a3bba144667970aa6d5e50e717 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 Feb 2022 16:42:22 +1100 Subject: [PATCH] Filter: added EnableOnAllIMUs option to harmonic notch filter --- libraries/Filter/HarmonicNotchFilter.cpp | 2 +- libraries/Filter/HarmonicNotchFilter.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/Filter/HarmonicNotchFilter.cpp b/libraries/Filter/HarmonicNotchFilter.cpp index eba27e9872..d9b4880e31 100644 --- a/libraries/Filter/HarmonicNotchFilter.cpp +++ b/libraries/Filter/HarmonicNotchFilter.cpp @@ -85,7 +85,7 @@ const AP_Param::GroupInfo HarmonicNotchFilterParams::var_info[] = { // @Param: OPTS // @DisplayName: Harmonic Notch Filter options // @Description: Harmonic Notch Filter options. Double-notches can provide deeper attenuation across a wider bandwidth than single notches and are suitable for larger aircraft. Dynamic harmonics attaches a harmonic notch to each detected noise frequency instead of simply being multiples of the base frequency, in the case of FFT it will attach notches to each of three detected noise peaks, in the case of ESC it will attach notches to each of four motor RPM values. Loop rate update changes the notch center frequency at the scheduler loop rate rather than at the default of 200Hz. - // @Bitmask: 0:Double notch,1:Dynamic harmonic,2:Update at loop rate + // @Bitmask: 0:Double notch,1:Dynamic harmonic,2:Update at loop rate,3:EnableOnAllIMUs // @User: Advanced // @RebootRequired: True AP_GROUPINFO("OPTS", 8, HarmonicNotchFilterParams, _options, 0), diff --git a/libraries/Filter/HarmonicNotchFilter.h b/libraries/Filter/HarmonicNotchFilter.h index 34119bf6db..2d1810b44d 100644 --- a/libraries/Filter/HarmonicNotchFilter.h +++ b/libraries/Filter/HarmonicNotchFilter.h @@ -84,7 +84,8 @@ public: enum class Options { DoubleNotch = 1<<0, DynamicHarmonic = 1<<1, - LoopRateUpdate = 2<<1, + LoopRateUpdate = 1<<2, + EnableOnAllIMUs = 1<<3, }; HarmonicNotchFilterParams(void);