Merge pull request #6864 from etracer65/overflow_filter_order_fix
Fix ordering of gyro filtering and overflow/yaw-spin logic
This commit is contained in:
commit
eb7a3250c2
|
@ -949,6 +949,12 @@ static FAST_CODE FAST_CODE_NOINLINE void gyroUpdateSensor(gyroSensor_t *gyroSens
|
|||
return;
|
||||
}
|
||||
|
||||
if (gyroDebugMode == DEBUG_NONE) {
|
||||
filterGyro(gyroSensor);
|
||||
} else {
|
||||
filterGyroDebug(gyroSensor);
|
||||
}
|
||||
|
||||
#ifdef USE_GYRO_OVERFLOW_CHECK
|
||||
if (gyroConfig()->checkOverflow && !gyroHasOverflowProtection) {
|
||||
checkForOverflow(gyroSensor, currentTimeUs);
|
||||
|
@ -961,12 +967,6 @@ static FAST_CODE FAST_CODE_NOINLINE void gyroUpdateSensor(gyroSensor_t *gyroSens
|
|||
}
|
||||
#endif
|
||||
|
||||
if (gyroDebugMode == DEBUG_NONE) {
|
||||
filterGyro(gyroSensor);
|
||||
} else {
|
||||
filterGyroDebug(gyroSensor);
|
||||
}
|
||||
|
||||
#ifdef USE_GYRO_DATA_ANALYSE
|
||||
if (isDynamicFilterActive()) {
|
||||
gyroDataAnalyse(&gyroSensor->gyroAnalyseState, gyroSensor->notchFilterDyn);
|
||||
|
|
Loading…
Reference in New Issue