From 0275129c2386ffe3a0e5bea8f4eefcb9ddc59546 Mon Sep 17 00:00:00 2001 From: ProDrone Date: Sat, 19 Sep 2015 01:56:53 +0200 Subject: [PATCH] Ignore ACC sensor when setting looptime IMU uses quaternions instead of euler (ACC speedup). Faster trigonio & math functions activated. --- src/main/drivers/gyro_sync.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/drivers/gyro_sync.c b/src/main/drivers/gyro_sync.c index 08c848806c..89aa266509 100644 --- a/src/main/drivers/gyro_sync.c +++ b/src/main/drivers/gyro_sync.c @@ -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);