1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Added tracking of multiple dynamic notches per axis and replaced FFT with SDFT

This commit is contained in:
KarateBrot 2020-09-22 18:15:06 +02:00
parent 7b46440056
commit d02af7334c
16 changed files with 504 additions and 326 deletions

View file

@ -752,8 +752,8 @@ static CMS_Menu cmsx_menuFilterGlobal = {
#ifdef USE_GYRO_DATA_ANALYSE
static uint16_t dynFiltNotchMaxHz;
static uint8_t dynFiltWidthPercent;
static uint16_t dynFiltNotchQ;
static uint8_t dynFiltCount;
static uint16_t dynFiltBandwidthHz;
static uint16_t dynFiltNotchMinHz;
#endif
#ifdef USE_DYN_LPF
@ -771,8 +771,8 @@ static const void *cmsx_menuDynFilt_onEnter(displayPort_t *pDisp)
#ifdef USE_GYRO_DATA_ANALYSE
dynFiltNotchMaxHz = gyroConfig()->dyn_notch_max_hz;
dynFiltWidthPercent = gyroConfig()->dyn_notch_width_percent;
dynFiltNotchQ = gyroConfig()->dyn_notch_q;
dynFiltCount = gyroConfig()->dyn_notch_count;
dynFiltBandwidthHz = gyroConfig()->dyn_notch_bandwidth_hz;
dynFiltNotchMinHz = gyroConfig()->dyn_notch_min_hz;
#endif
#ifdef USE_DYN_LPF
@ -795,8 +795,8 @@ static const void *cmsx_menuDynFilt_onExit(displayPort_t *pDisp, const OSD_Entry
#ifdef USE_GYRO_DATA_ANALYSE
gyroConfigMutable()->dyn_notch_max_hz = dynFiltNotchMaxHz;
gyroConfigMutable()->dyn_notch_width_percent = dynFiltWidthPercent;
gyroConfigMutable()->dyn_notch_q = dynFiltNotchQ;
gyroConfigMutable()->dyn_notch_count = dynFiltCount;
gyroConfigMutable()->dyn_notch_bandwidth_hz = dynFiltBandwidthHz;
gyroConfigMutable()->dyn_notch_min_hz = dynFiltNotchMinHz;
#endif
#ifdef USE_DYN_LPF
@ -817,8 +817,8 @@ static const OSD_Entry cmsx_menuDynFiltEntries[] =
{ "-- DYN FILT --", OME_Label, NULL, NULL, 0 },
#ifdef USE_GYRO_DATA_ANALYSE
{ "NOTCH WIDTH %", OME_UINT8, NULL, &(OSD_UINT8_t) { &dynFiltWidthPercent, 0, 20, 1 }, 0 },
{ "NOTCH Q", OME_UINT16, NULL, &(OSD_UINT16_t) { &dynFiltNotchQ, 0, 1000, 1 }, 0 },
{ "NOTCH COUNT", OME_UINT8, NULL, &(OSD_UINT8_t) { &dynFiltCount, 1, DYN_NOTCH_COUNT_MAX, 1 }, 0 },
{ "NOTCH WIDTH HZ", OME_UINT16, NULL, &(OSD_UINT16_t) { &dynFiltBandwidthHz, 1, 1000, 1 }, 0 },
{ "NOTCH MIN HZ", OME_UINT16, NULL, &(OSD_UINT16_t) { &dynFiltNotchMinHz, 0, 1000, 1 }, 0 },
{ "NOTCH MAX HZ", OME_UINT16, NULL, &(OSD_UINT16_t) { &dynFiltNotchMaxHz, 0, 1000, 1 }, 0 },
#endif