mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 01:17:51 +08:00
bmi160_main:Make the internal interface conditional on PX4_SPIDEV_BMI
px4fmuv2 had PX4_SPIDEV_BMI defined, for the v3 cmake, but never provided a Chip select decoded by PX4_SPIDEV_BMI. PX4_SPIDEV_BMI has been removed from V2, but PX4_SPIDEV_EXT_BMI still remains and has a chip select assigned to it.
This commit is contained in:
committed by
Lorenz Meier
parent
43843b753d
commit
5bb084408d
@@ -54,7 +54,11 @@ start(bool external_bus, enum Rotation rotation)
|
||||
#endif
|
||||
|
||||
} else {
|
||||
#if defined(PX4_SPIDEV_BMI)
|
||||
*g_dev_ptr = new BMI160(PX4_SPI_BUS_SENSORS, path_accel, path_gyro, (spi_dev_e)PX4_SPIDEV_BMI, rotation);
|
||||
#else
|
||||
errx(0, "No Internal SPI CS");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (*g_dev_ptr == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user