1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 14:55:21 +03:00

Configurable acc/gyro

This commit is contained in:
jflyper 2018-05-10 22:25:37 +09:00
parent 5ef68ef6a3
commit fc6c24c38e
133 changed files with 1095 additions and 1116 deletions

View file

@ -347,14 +347,11 @@ bool accInit(uint32_t gyroSamplingInverval)
acc.dev.mpuDetectionResult = *gyroMpuDetectionResult();
acc.dev.acc_high_fsr = accelerometerConfig()->acc_high_fsr;
#ifdef USE_DUAL_GYRO
acc.dev.accAlign = ACC_1_ALIGN;
#ifdef ACC_2_ALIGN
if (gyroConfig()->gyro_to_use == GYRO_CONFIG_USE_GYRO_2) {
acc.dev.accAlign = ACC_2_ALIGN;
} else {
acc.dev.accAlign = ACC_1_ALIGN;
}
#else
acc.dev.accAlign = ALIGN_DEFAULT;
#endif
if (!accDetect(&acc.dev, accelerometerConfig()->acc_hardware)) {