1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

Add gyro rates and configurable FSR for ICM20649 (#4077)

This commit is contained in:
brianlbalogh 2017-09-07 09:05:11 -04:00 committed by Martin Budden
parent ba4587e949
commit b295a159b0
9 changed files with 67 additions and 21 deletions

View file

@ -113,7 +113,8 @@ void pgResetFn_accelerometerConfig(accelerometerConfig_t *instance)
RESET_CONFIG_2(accelerometerConfig_t, instance,
.acc_lpf_hz = 10,
.acc_align = ALIGN_DEFAULT,
.acc_hardware = ACC_DEFAULT
.acc_hardware = ACC_DEFAULT,
.acc_high_fsr = false,
);
resetRollAndPitchTrims(&instance->accelerometerTrims);
resetFlightDynamicsTrims(&instance->accZero);
@ -317,6 +318,7 @@ bool accInit(uint32_t gyroSamplingInverval)
acc.dev.bus = *gyroSensorBus();
acc.dev.mpuConfiguration = *gyroMpuConfiguration();
acc.dev.mpuDetectionResult = *gyroMpuDetectionResult();
acc.dev.acc_high_fsr = accelerometerConfig()->acc_high_fsr;
if (!accDetect(&acc.dev, accelerometerConfig()->acc_hardware)) {
return false;
}