diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 10e1c54e76..167c8e17c0 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -73,6 +73,11 @@ then then fi + # Internal SPI bus ICM-20602-G is rotated 90 deg yaw + if mpu6000 -R 2 -T 20602 start + then + fi + # Internal SPI bus ICM-20608-G is rotated 90 deg yaw if mpu6000 -R 2 -T 20608 start then diff --git a/src/drivers/boards/auav-x21/auav_spi.c b/src/drivers/boards/auav-x21/auav_spi.c index 3c2fe711c0..75681dfe3b 100644 --- a/src/drivers/boards/auav-x21/auav_spi.c +++ b/src/drivers/boards/auav-x21/auav_spi.c @@ -94,13 +94,13 @@ __EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, switch (devid) { - /* intended fallthrough */ + /* intended fallthrough */ case PX4_SPIDEV_ICM_20602: - /* intended fallthrough */ - case PX4_SPIDEV_ICM_20608: - /* Making sure the other peripherals are not selected */ - px4_arch_gpiowrite(GPIO_SPI_CS_ICM_2060X, !selected); + /* intended fallthrough */ + case PX4_SPIDEV_ICM_20608: + /* Making sure the other peripherals are not selected */ + px4_arch_gpiowrite(GPIO_SPI_CS_ICM_2060X, !selected); px4_arch_gpiowrite(GPIO_SPI_CS_BARO, 1); px4_arch_gpiowrite(GPIO_SPI_CS_MPU, 1); break;