mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Fix 32KHz gyro targetLooptime calculation
The target loop time was being calculated incorrectly for 32KHz gyros. Constant shoud be 31.25 rather than 31.5.
This commit is contained in:
parent
f4011b3dc3
commit
359290d1df
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ uint32_t gyroSetSampleRate(gyroDev_t *gyro, uint8_t lpf, uint8_t gyroSyncDenomin
|
|||
if (lpf == GYRO_HARDWARE_LPF_NORMAL || lpf == GYRO_HARDWARE_LPF_EXPERIMENTAL) {
|
||||
if (gyro_use_32khz) {
|
||||
gyro->gyroRateKHz = GYRO_RATE_32_kHz;
|
||||
gyroSamplePeriod = 31.5f;
|
||||
gyroSamplePeriod = 31.25f;
|
||||
} else {
|
||||
switch (gyro->mpuDetectionResult.sensor) {
|
||||
case BMI_160_SPI:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue