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

Ignore ACC sensor when setting looptime

IMU uses quaternions instead of euler (ACC speedup).
Faster trigonio & math functions activated.
This commit is contained in:
ProDrone 2015-09-19 01:56:53 +02:00
parent 47afa51bd7
commit 0275129c23

View file

@ -90,20 +90,10 @@ void gyroUpdateSampleRate(uint32_t looptime, uint8_t lpf, uint8_t syncGyroToLoop
#else
if (lpf == INV_FILTER_256HZ_NOLPF2) {
gyroSamplePeriod = 125;
if(!sensors(SENSOR_ACC)) {
minLooptime = 625; // Max refresh 1,6khz
} else {
minLooptime = 1625; // Max refresh 615hz
}
minLooptime = 625; // Max refresh 1,6khz
} else {
gyroSamplePeriod = 1000;
if(!sensors(SENSOR_ACC)) {
minLooptime = 1000; // Full sampling without ACC
} else {
minLooptime = 2000;
}
minLooptime = 1000; // Full sampling without ACC
}
#endif
looptime = constrain(looptime, minLooptime, 4000);