Skip to content

Commit

Permalink
fix compiler warnings for ACC_2_ALIGN identical branches (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter authored Apr 26, 2024
1 parent c7d7dd3 commit bf21531
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/sensors/acceleration.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,15 @@ bool accInit(void) {
acc.dev.mpuDetectionResult = *gyroMpuDetectionResult();
acc.dev.acc_high_fsr = accelerometerConfig()->acc_high_fsr;
#ifdef USE_DUAL_GYRO
#if defined 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;
}
#elif defined ACC_1_ALIGN
acc.dev.accAlign = ACC_1_ALIGN;
#else
acc.dev.accAlign = ALIGN_DEFAULT;
#endif
#else
acc.dev.accAlign = ALIGN_DEFAULT;
#endif
Expand Down

0 comments on commit bf21531

Please sign in to comment.