mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
fix compilation without ACC (#14218)
* fix compilation without ACC - compilatiopn may fail with cryptic message when no ACC is selected (unused variable `dev`). Mark dev as unused - MPU6500 is handled differently than all other accs (it is only driver that adds case labels) - also make dev UNUSED for gyro * Update src/main/sensors/acceleration_init.c --------- Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
This commit is contained in:
parent
79ecc1ac74
commit
e7f0486ebe
2 changed files with 4 additions and 2 deletions
|
@ -167,11 +167,11 @@ retry:
|
|||
FALLTHROUGH;
|
||||
#endif
|
||||
|
||||
#if defined(USE_ACC_MPU6500) || defined(USE_ACC_SPI_MPU6500)
|
||||
case ACC_MPU6500:
|
||||
case ACC_ICM20601:
|
||||
case ACC_ICM20602:
|
||||
case ACC_ICM20608G:
|
||||
#if defined(USE_ACC_MPU6500) || defined(USE_ACC_SPI_MPU6500)
|
||||
#ifdef USE_ACC_SPI_MPU6500
|
||||
if (mpu6500SpiAccDetect(dev)) {
|
||||
#else
|
||||
|
@ -195,8 +195,8 @@ retry:
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
FALLTHROUGH;
|
||||
#endif
|
||||
|
||||
#ifdef USE_ACC_SPI_ICM20649
|
||||
case ACC_ICM20649:
|
||||
|
@ -287,6 +287,7 @@ retry:
|
|||
|
||||
default:
|
||||
case ACC_NONE: // disable ACC
|
||||
UNUSED(dev);
|
||||
accHardware = ACC_NONE;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue