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:
parent
47afa51bd7
commit
0275129c23
1 changed files with 2 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue