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

Extend gyro filter implementation debugging for pitch and yaw axis.

* Introduce CLI parameter gyro_filter_debug_axis which defaults to 'ROLL',
  the previous behavior. When set to either PITCH, or YAW, the debug logging
  implementation in the gyro filtering will use that axis instead.
This commit is contained in:
AJ Christensen 2019-01-19 11:01:46 +13:00
parent 8e2cba97da
commit 5bcf35c7af
5 changed files with 14 additions and 2 deletions

View file

@ -453,6 +453,10 @@ const char * const lookupTableLEDRaceColors[COLOR_COUNT] = {
"DEEP_PINK"
};
static const char * const lookupTableGyroFilterDebug[] = {
"ROLL", "PITCH", "YAW"
};
#define LOOKUP_TABLE_ENTRY(name) { name, ARRAYLEN(name) }
const lookupTableEntry_t lookupTables[] = {
@ -565,6 +569,8 @@ const lookupTableEntry_t lookupTables[] = {
LOOKUP_TABLE_ENTRY(lookupTableLEDProfile),
LOOKUP_TABLE_ENTRY(lookupTableLEDRaceColors),
#endif
LOOKUP_TABLE_ENTRY(lookupTableGyroFilterDebug),
};
#undef LOOKUP_TABLE_ENTRY
@ -621,6 +627,7 @@ const clivalue_t valueTable[] = {
{ "dyn_lpf_dterm_min_hz", VAR_UINT16 | PROFILE_VALUE, .config.minmax = { 0, 1000 }, PG_PID_PROFILE, offsetof(pidProfile_t, dyn_lpf_dterm_min_hz) },
{ "dyn_lpf_dterm_max_hz", VAR_UINT16 | PROFILE_VALUE, .config.minmax = { 0, 1000 }, PG_PID_PROFILE, offsetof(pidProfile_t, dyn_lpf_dterm_max_hz) },
#endif
{ "gyro_filter_debug_axis", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GYRO_FILTER_DEBUG }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_filter_debug_axis) },
// PG_ACCELEROMETER_CONFIG
{ "align_acc", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_ALIGNMENT }, PG_ACCELEROMETER_CONFIG, offsetof(accelerometerConfig_t, acc_align) },