1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 08:15:26 +03:00

ST gyro LPF fix. Default gyro lpd to 98Hz

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2016-03-12 19:22:52 +10:00
parent f1aa9e6f44
commit c0c726a272
2 changed files with 6 additions and 6 deletions

View file

@ -426,10 +426,10 @@ static void resetConf(void)
// global settings
masterConfig.current_profile_index = 0; // default profile
masterConfig.dcm_kp_acc = 2500; // 0.25 * 10000
masterConfig.dcm_ki_acc = 0; // 0.00 * 10000
masterConfig.dcm_ki_acc = 50; // 0.005 * 10000
masterConfig.dcm_kp_mag = 10000; // 1.00 * 10000
masterConfig.dcm_ki_mag = 0; // 0.00 * 10000
masterConfig.gyro_lpf = 3; // BITS_DLPF_CFG_42HZ, In case of ST gyro, will default to 32Hz instead
masterConfig.gyro_lpf = 2; // BITS_DLPF_CFG_98HZ, In case of ST gyro, will default to 54Hz instead
resetAccelerometerTrims(&masterConfig.accZero, &masterConfig.accGain);

View file

@ -85,16 +85,16 @@ static void l3g4200dInit(uint8_t lpf)
// Conversion from MPU6XXX LPF values
switch (lpf) {
default:
case 3:
case 3: // BITS_DLPF_CFG_42HZ
mpuLowPassFilter = L3G4200D_DLPF_32HZ;
break;
case 4:
case 2: // BITS_DLPF_CFG_98HZ
mpuLowPassFilter = L3G4200D_DLPF_54HZ;
break;
case 5:
case 1: // BITS_DLPF_CFG_188HZ
mpuLowPassFilter = L3G4200D_DLPF_78HZ;
break;
case 6:
case 0: // BITS_DLPF_CFG_256HZ
mpuLowPassFilter = L3G4200D_DLPF_93HZ;
break;
}