mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
Gyro Sync feature (Loop synced to Gyro)
Remove double MPU_RA_PWR_MGMT_1 Looptime to Gyro refresh rate disable 2khz when acc used for F3 Gyro sync code improvement doc change MPU6500 INT_STATUS support // MPU3500 dummy handling Enable full 1khz sampling on F1 boards (no acc mode) Add MPU3050 INT_STATUS F1 target decreased max refresh Configurable optione (sync_gyro_to_loop) correction watchdog correct filter Coding style and cleanup code Cli.md Bump EEPROM version MPU6050 MPU DATA READY Pin instead of i2c Add more targets and corrections correction to CC3D ident MPU6500 correction INT_ENABLE MPU6500 add interrupt mpu6500 MPU6500 corrections from rebase MPU6500 correct Final fix to compile // ready for testing and review MPU6000 / MPU3050 Corrections Add CC3D extiConfig add mpu6500 Fix intStatus position fix returns Add COLIBRI_RACE MPU INT Change CLI name to gyro_sync This is shorter typing and speaks for itself Fix MotoLab After rebase Add motolab Full gyro Sync rework Idents etc Doc update more corrections Fix serial_cli refactor // ident GPL single line runloop refactor
This commit is contained in:
parent
6926c2057f
commit
10a96b0dfc
25 changed files with 238 additions and 75 deletions
|
@ -153,7 +153,7 @@ static char cliBuffer[48];
|
|||
static uint32_t bufferIndex = 0;
|
||||
|
||||
#ifndef USE_QUAD_MIXER_ONLY
|
||||
// sync this with mixerMode_e
|
||||
// this with mixerMode_e
|
||||
static const char * const mixerNames[] = {
|
||||
"TRI", "QUADP", "QUADX", "BI",
|
||||
"GIMBAL", "Y6", "HEX6",
|
||||
|
@ -351,6 +351,15 @@ static const char * const lookupTableGyroFilter[] = {
|
|||
"OFF", "LOW", "MEDIUM", "HIGH"
|
||||
};
|
||||
|
||||
static const char * const lookupTableGyroLpf[] = {
|
||||
"256HZ",
|
||||
"188HZ",
|
||||
"98HZ",
|
||||
"42HZ",
|
||||
"20HZ",
|
||||
"10HZ"
|
||||
};
|
||||
|
||||
|
||||
typedef struct lookupTableEntry_s {
|
||||
const char * const *values;
|
||||
|
@ -373,6 +382,7 @@ typedef enum {
|
|||
TABLE_PID_CONTROLLER,
|
||||
TABLE_SERIAL_RX,
|
||||
TABLE_GYRO_FILTER,
|
||||
TABLE_GYRO_LPF,
|
||||
} lookupTableIndex_e;
|
||||
|
||||
static const lookupTableEntry_t lookupTables[] = {
|
||||
|
@ -390,7 +400,8 @@ static const lookupTableEntry_t lookupTables[] = {
|
|||
{ lookupTableGimbalMode, sizeof(lookupTableGimbalMode) / sizeof(char *) },
|
||||
{ lookupTablePidController, sizeof(lookupTablePidController) / sizeof(char *) },
|
||||
{ lookupTableSerialRX, sizeof(lookupTableSerialRX) / sizeof(char *) },
|
||||
{ lookupTableGyroFilter, sizeof(lookupTableGyroFilter) / sizeof(char *) }
|
||||
{ lookupTableGyroFilter, sizeof(lookupTableGyroFilter) / sizeof(char *) },
|
||||
{ lookupTableGyroLpf, sizeof(lookupTableGyroLpf) / sizeof(char *) }
|
||||
};
|
||||
|
||||
#define VALUE_TYPE_OFFSET 0
|
||||
|
@ -446,6 +457,8 @@ const clivalue_t valueTable[] = {
|
|||
{ "looptime", VAR_UINT16 | MASTER_VALUE, &masterConfig.looptime, .config.minmax = {0, 9000} },
|
||||
{ "emf_avoidance", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.emf_avoidance, .config.lookup = { TABLE_OFF_ON } },
|
||||
{ "i2c_overclock", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.i2c_overclock, .config.lookup = { TABLE_OFF_ON } },
|
||||
{ "gyro_sync", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.gyroSync, .config.lookup = { TABLE_OFF_ON } },
|
||||
{ "gyro_sync_denom", VAR_UINT8 | MASTER_VALUE, &masterConfig.gyroSyncDenominator, .config.minmax = { 1, 32 } },
|
||||
|
||||
{ "mid_rc", VAR_UINT16 | MASTER_VALUE, &masterConfig.rxConfig.midrc, .config.minmax = { 1200, 1700 } },
|
||||
{ "min_check", VAR_UINT16 | MASTER_VALUE, &masterConfig.rxConfig.mincheck, .config.minmax = { PWM_RANGE_ZERO, PWM_RANGE_MAX } },
|
||||
|
@ -532,7 +545,7 @@ const clivalue_t valueTable[] = {
|
|||
|
||||
{ "max_angle_inclination", VAR_UINT16 | MASTER_VALUE, &masterConfig.max_angle_inclination, .config.minmax = { 100, 900 } },
|
||||
|
||||
{ "gyro_lpf", VAR_UINT16 | MASTER_VALUE, &masterConfig.gyro_lpf, .config.minmax = { 0, 256 } },
|
||||
{ "gyro_lpf", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.gyro_lpf, .config.lookup = { TABLE_GYRO_LPF } },
|
||||
{ "moron_threshold", VAR_UINT8 | MASTER_VALUE, &masterConfig.gyroConfig.gyroMovementCalibrationThreshold, .config.minmax = { 0, 128 } },
|
||||
{ "imu_dcm_kp", VAR_UINT16 | MASTER_VALUE, &masterConfig.dcm_kp, .config.minmax = { 0, 20000 } },
|
||||
{ "imu_dcm_ki", VAR_UINT16 | MASTER_VALUE, &masterConfig.dcm_ki, .config.minmax = { 0, 20000 } },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue