1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Increase Number of Available Dynamic Notches to 7 (#13750)

This commit is contained in:
Brian White 2024-07-28 16:10:36 -04:00 committed by GitHub
parent 5e40ec857d
commit 1fb73b36f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

View file

@ -375,8 +375,9 @@ static FAST_CODE_NOINLINE void dynNotchProcess(void)
}
if (state.axis == gyro.gyroDebugAxis) {
for (int p = 0; p < dynNotch.count && p < 3; p++) {
DEBUG_SET(DEBUG_FFT_FREQ, p, lrintf(dynNotch.centerFreq[state.axis][p]));
for (int p = 0; p < dynNotch.count && p < DYN_NOTCH_COUNT_MAX; p++) {
// debug channel 0 is reserved for pre DN gyro
DEBUG_SET(DEBUG_FFT_FREQ, p + 1, lrintf(dynNotch.centerFreq[state.axis][p]));
}
DEBUG_SET(DEBUG_DYN_LPF, 1, lrintf(dynNotch.centerFreq[state.axis][0]));
}

View file

@ -26,7 +26,7 @@
#include "pg/dyn_notch.h"
#define DYN_NOTCH_COUNT_MAX 5
#define DYN_NOTCH_COUNT_MAX 7
void dynNotchInit(const dynNotchConfig_t *config, const timeUs_t targetLooptimeUs);
void dynNotchPush(const int axis, const float sample);

View file

@ -68,7 +68,7 @@ static FAST_CODE void GYRO_FILTER_FUNCTION_NAME(void)
if (isDynNotchActive()) {
if (axis == gyro.gyroDebugAxis) {
GYRO_FILTER_DEBUG_SET(DEBUG_FFT, 0, lrintf(gyroADCf));
GYRO_FILTER_DEBUG_SET(DEBUG_FFT_FREQ, 3, lrintf(gyroADCf));
GYRO_FILTER_DEBUG_SET(DEBUG_FFT_FREQ, 0, lrintf(gyroADCf));
GYRO_FILTER_DEBUG_SET(DEBUG_DYN_LPF, 0, lrintf(gyroADCf));
}