Fixed gyro Q factor calculation

This commit is contained in:
Martin Budden 2016-11-23 15:12:43 +00:00
parent 747649ce3a
commit fa4d04b5a7
1 changed files with 6 additions and 2 deletions

View File

@ -68,10 +68,14 @@ void gyroUseConfig(const gyroConfig_t *gyroConfigToUse,
gyroConfig = gyroConfigToUse;
gyroSoftLpfHz = gyro_soft_lpf_hz;
gyroSoftNotchHz1 = gyro_soft_notch_hz_1;
if (gyro_soft_notch_hz_1) {
gyroSoftNotchQ1 = filterGetNotchQ(gyro_soft_notch_hz_1, gyro_soft_notch_cutoff_1);
}
gyroSoftNotchHz2 = gyro_soft_notch_hz_2;
if (gyro_soft_notch_hz_2) {
gyroSoftNotchQ2 = filterGetNotchQ(gyro_soft_notch_hz_2, gyro_soft_notch_cutoff_2);
}
gyroSoftLpfType = gyro_soft_lpf_type;
gyroSoftNotchQ1 = filterGetNotchQ(gyro_soft_notch_hz_1, gyro_soft_notch_cutoff_1);
gyroSoftNotchQ2 = filterGetNotchQ(gyro_soft_notch_hz_2, gyro_soft_notch_cutoff_2);
}
void gyroInit(void)