1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Restricted Dterm lowpass filter options (#5492)

* Restricted allowed filter types for Dterm lowpass 1

* Fixed output of CLI lookup entires with skips

* Reverted trailing NULLs

* Revert whitespace changes
This commit is contained in:
Andrey Mironov 2018-03-22 00:28:10 +03:00 committed by Michael Keller
parent b98bdcc3f8
commit a453063dd7
2 changed files with 14 additions and 1 deletions

View file

@ -257,12 +257,23 @@ static const char * const lookupTableLowpassType[] = {
"BIQUAD",
#if defined(USE_FIR_FILTER_DENOISE)
"FIR",
#else
NULL,
#endif
"BUTTERWORTH",
"BIQUAD_RC_FIR2",
"FAST_KALMAN"
};
static const char * const lookupTableDtermLowpassType[] = {
"PT1",
"BIQUAD",
#if defined(USE_FIR_FILTER_DENOISE)
"FIR"
#endif
};
static const char * const lookupTableFailsafe[] = {
"AUTO-LAND", "DROP"
};
@ -342,6 +353,7 @@ const lookupTableEntry_t lookupTables[] = {
{ lookupTableRcInterpolation, sizeof(lookupTableRcInterpolation) / sizeof(char *) },
{ lookupTableRcInterpolationChannels, sizeof(lookupTableRcInterpolationChannels) / sizeof(char *) },
{ lookupTableLowpassType, sizeof(lookupTableLowpassType) / sizeof(char *) },
{ lookupTableDtermLowpassType, sizeof(lookupTableDtermLowpassType) / sizeof(char *) },
{ lookupTableFailsafe, sizeof(lookupTableFailsafe) / sizeof(char *) },
{ lookupTableCrashRecovery, sizeof(lookupTableCrashRecovery) / sizeof(char *) },
#ifdef USE_CAMERA_CONTROL
@ -661,7 +673,7 @@ const clivalue_t valueTable[] = {
#endif
// PG_PID_PROFILE
{ "dterm_lowpass_type", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_LOWPASS_TYPE }, PG_PID_PROFILE, offsetof(pidProfile_t, dterm_filter_type) },
{ "dterm_lowpass_type", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_DTERM_LOWPASS_TYPE }, PG_PID_PROFILE, offsetof(pidProfile_t, dterm_filter_type) },
{ "dterm_lowpass_hz", VAR_INT16 | PROFILE_VALUE, .config.minmax = { 0, 16000 }, PG_PID_PROFILE, offsetof(pidProfile_t, dterm_lowpass_hz) },
{ "dterm_lowpass2_hz", VAR_INT16 | PROFILE_VALUE, .config.minmax = { 0, 16000 }, PG_PID_PROFILE, offsetof(pidProfile_t, dterm_lowpass2_hz) },
{ "dterm_notch_hz", VAR_UINT16 | PROFILE_VALUE, .config.minmax = { 0, 16000 }, PG_PID_PROFILE, offsetof(pidProfile_t, dterm_notch_hz) },