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:
parent
f5ad7f6003
commit
0539abc649
13 changed files with 34 additions and 84 deletions
|
@ -773,7 +773,7 @@ void loop(void)
|
|||
if (gyroSyncCheckUpdate() || (int32_t)(currentTime - (loopTime + GYRO_WATCHDOG_DELAY)) >= 0) {
|
||||
|
||||
loopTime = currentTime + targetLooptime;
|
||||
imuUpdate(¤tProfile->accelerometerTrims, masterConfig.acc_for_fast_looptime);
|
||||
imuUpdate(¤tProfile->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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue