mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Add option to check gyro overflow on yaw or all axes
This commit is contained in:
parent
eccdf2d4a5
commit
2281c9ab8c
5 changed files with 46 additions and 6 deletions
|
@ -274,6 +274,12 @@ static const char * const lookupTableMax7456Clock[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef USE_GYRO_OVERFLOW_CHECK
|
||||
static const char * const lookupTableGyroOverflowCheck[] = {
|
||||
"OFF", "YAW", "ALL"
|
||||
};
|
||||
#endif
|
||||
|
||||
const lookupTableEntry_t lookupTables[] = {
|
||||
{ lookupTableOffOn, sizeof(lookupTableOffOn) / sizeof(char *) },
|
||||
{ lookupTableUnit, sizeof(lookupTableUnit) / sizeof(char *) },
|
||||
|
@ -327,6 +333,9 @@ const lookupTableEntry_t lookupTables[] = {
|
|||
#ifdef USE_RANGEFINDER
|
||||
{ lookupTableRangefinderHardware, sizeof(lookupTableRangefinderHardware) / sizeof(char *) },
|
||||
#endif
|
||||
#ifdef USE_GYRO_OVERFLOW_CHECK
|
||||
{ lookupTableGyroOverflowCheck, sizeof(lookupTableGyroOverflowCheck) / sizeof(char *) },
|
||||
#endif
|
||||
};
|
||||
|
||||
const clivalue_t valueTable[] = {
|
||||
|
@ -344,7 +353,9 @@ const clivalue_t valueTable[] = {
|
|||
{ "gyro_notch2_hz", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 16000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_soft_notch_hz_2) },
|
||||
{ "gyro_notch2_cutoff", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 16000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_soft_notch_cutoff_2) },
|
||||
{ "moron_threshold", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 200 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyroMovementCalibrationThreshold) },
|
||||
{ "gyro_overflow_detect", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, checkOverflow) },
|
||||
#ifdef USE_GYRO_OVERFLOW_CHECK
|
||||
{ "gyro_overflow_detect", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GYRO_OVERFLOW_CHECK }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, checkOverflow) },
|
||||
#endif
|
||||
#if defined(GYRO_USES_SPI)
|
||||
#if defined(USE_GYRO_SPI_MPU6500) || defined(USE_GYRO_SPI_MPU9250) || defined(USE_GYRO_SPI_ICM20689)
|
||||
{ "gyro_use_32khz", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_use_32khz) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue