1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

Changes from review

Used HZ_TO_INTERVAL_US() instead of hardcoded 500us.

Moved tests into a dedicated function.
This commit is contained in:
Bruce Luckcuck 2018-07-29 17:16:01 -04:00
parent f411b82eb6
commit 25c6b038d9
5 changed files with 9 additions and 4 deletions

View file

@ -304,4 +304,7 @@ static FAST_CODE_NOINLINE void gyroDataAnalyseUpdate(gyroAnalyseState_t *state,
state->updateStep = (state->updateStep + 1) % STEP_COUNT;
}
bool dynamicFilterAllowed(void) {
return (gyro.targetLooptime <= HZ_TO_INTERVAL_US(2000));
}
#endif // USE_GYRO_DATA_ANALYSE