mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Apply gyro zero before filtering // Fix Luxfloat Drift
This commit is contained in:
parent
17e5c569b2
commit
f3f7827c33
1 changed files with 6 additions and 6 deletions
|
@ -152,6 +152,12 @@ void gyroUpdate(void)
|
||||||
|
|
||||||
alignSensors(gyroADC, gyroADC, gyroAlign);
|
alignSensors(gyroADC, gyroADC, gyroAlign);
|
||||||
|
|
||||||
|
if (!isGyroCalibrationComplete()) {
|
||||||
|
performAcclerationCalibration(gyroConfig->gyroMovementCalibrationThreshold);
|
||||||
|
}
|
||||||
|
|
||||||
|
applyGyroZero();
|
||||||
|
|
||||||
if (gyroLpfCutFreq) {
|
if (gyroLpfCutFreq) {
|
||||||
if (!gyroFilterStateIsSet) initGyroFilterCoefficients(); /* initialise filter coefficients */
|
if (!gyroFilterStateIsSet) initGyroFilterCoefficients(); /* initialise filter coefficients */
|
||||||
|
|
||||||
|
@ -162,10 +168,4 @@ void gyroUpdate(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isGyroCalibrationComplete()) {
|
|
||||||
performAcclerationCalibration(gyroConfig->gyroMovementCalibrationThreshold);
|
|
||||||
}
|
|
||||||
|
|
||||||
applyGyroZero();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue