1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Dterm scaling correction // Code cleanup

This commit is contained in:
borisbstyle 2015-09-19 23:37:41 +02:00
parent f5ad7f6003
commit 0539abc649
13 changed files with 34 additions and 84 deletions

View file

@ -773,7 +773,7 @@ void loop(void)
if (gyroSyncCheckUpdate() || (int32_t)(currentTime - (loopTime + GYRO_WATCHDOG_DELAY)) >= 0) {
loopTime = currentTime + targetLooptime;
imuUpdate(&currentProfile->accelerometerTrims, masterConfig.acc_for_fast_looptime);
imuUpdate(&currentProfile->accelerometerTrims);
// Measure loop rate just after reading the sensors
@ -781,13 +781,11 @@ void loop(void)
cycleTime = (int32_t)(currentTime - previousTime);
previousTime = currentTime;
dT = (float)cycleTime * 0.000001f;
dT = (float)targetLooptime * 0.000001f;
filterApply7TapFIR(gyroADC);
if (masterConfig.rcSmoothing) {
filterRc();
}
filterRc();
annexCode();
#if defined(BARO) || defined(SONAR)