1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Merge pull request #7529 from jflyper/bfdev-stronger-USE_ACC

[REFACTOR] More application of USE_ACC
This commit is contained in:
Michael Keller 2019-02-06 10:08:49 +13:00 committed by GitHub
commit 7393d5fdac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 48 additions and 21 deletions

View file

@ -538,7 +538,9 @@ void init(void)
// so we are ready to call validateAndFixGyroConfig(), pidInit(), and setAccelerationFilter()
validateAndFixGyroConfig();
pidInit(currentPidProfile);
#ifdef USE_ACC
accInitFilters();
#endif
#ifdef USE_PID_AUDIO
pidAudioInit();
@ -702,9 +704,11 @@ void init(void)
blackboxInit();
#endif
#ifdef USE_ACC
if (mixerConfig()->mixerMode == MIXER_GIMBAL) {
accSetCalibrationCycles(CALIBRATING_ACC_CYCLES);
}
#endif
gyroStartCalibration(false);
#ifdef USE_BARO
baroSetCalibrationCycles(CALIBRATING_BARO_CYCLES);