diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index 803fd3be7a..00b9304575 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -184,14 +184,8 @@ static const char * const sensorTypeNames[] = { #define SENSOR_NAMES_MASK (SENSOR_GYRO | SENSOR_ACC | SENSOR_BARO | SENSOR_MAG) -// sync with gyroSensor_e -static const char * const gyroNames[] = { - "AUTO", "NONE", "MPU6050", "L3G4200D", "MPU3050", "L3GD20", - "MPU6000", "MPU6500", "MPU9250", "ICM20601", "ICM20602", "ICM20608G", "ICM20689", "BMI160", "FAKE" -}; - static const char * const *sensorHardwareNames[] = { - gyroNames, lookupTableAccHardware, lookupTableBaroHardware, lookupTableMagHardware + lookupTableGyroHardware, lookupTableAccHardware, lookupTableBaroHardware, lookupTableMagHardware }; #endif // USE_SENSOR_NAMES diff --git a/src/main/fc/settings.c b/src/main/fc/settings.c index e29d9ff5e0..8f3a028ec5 100644 --- a/src/main/fc/settings.c +++ b/src/main/fc/settings.c @@ -74,13 +74,19 @@ #include "telemetry/frsky.h" #include "telemetry/telemetry.h" - // Sensor names (used in lookup tables for *_hardware settings and in status command output) // sync with accelerationSensor_e const char * const lookupTableAccHardware[] = { "AUTO", "NONE", "ADXL345", "MPU6050", "MMA8452", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "ICM20601", "ICM20602", "ICM20608", "ICM20689", "BMI160", "FAKE" }; + +// sync with gyroSensor_e +const char * const lookupTableGyroHardware[] = { + "AUTO", "NONE", "MPU6050", "L3G4200D", "MPU3050", "L3GD20", + "MPU6000", "MPU6500", "MPU9250", "ICM20601", "ICM20602", "ICM20608G", "ICM20689", "BMI160", "FAKE" +}; + #if defined(USE_SENSOR_NAMES) || defined(BARO) // sync with baroSensor_e const char * const lookupTableBaroHardware[] = { @@ -272,6 +278,7 @@ const lookupTableEntry_t lookupTables[] = { { lookupTableRxSpi, sizeof(lookupTableRxSpi) / sizeof(char *) }, #endif { lookupTableGyroLpf, sizeof(lookupTableGyroLpf) / sizeof(char *) }, + { lookupTableGyroHardware, sizeof(lookupTableGyroHardware) / sizeof(char *) }, { lookupTableAccHardware, sizeof(lookupTableAccHardware) / sizeof(char *) }, #ifdef BARO { lookupTableBaroHardware, sizeof(lookupTableBaroHardware) / sizeof(char *) }, diff --git a/src/main/fc/settings.h b/src/main/fc/settings.h index 52ddb0a3f5..a9f05e5803 100644 --- a/src/main/fc/settings.h +++ b/src/main/fc/settings.h @@ -41,6 +41,7 @@ typedef enum { TABLE_RX_SPI, #endif TABLE_GYRO_LPF, + TABLE_GYRO_HARDWARE, TABLE_ACC_HARDWARE, #ifdef BARO TABLE_BARO_HARDWARE, @@ -130,6 +131,8 @@ extern const uint16_t valueTableEntryCount; extern const clivalue_t valueTable[]; //extern const uint8_t lookupTablesEntryCount; +extern const char * const lookupTableGyroHardware[]; + extern const char * const lookupTableAccHardware[]; //extern const uint8_t lookupTableAccHardwareEntryCount;