Skip to content

Commit

Permalink
Add IMU compatible for KakuteH7Mini (#23831)
Browse files Browse the repository at this point in the history
Co-authored-by: jamming <[email protected]>
  • Loading branch information
julianoes and jamming authored Oct 21, 2024
1 parent 965d5b3 commit efbd01c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions boards/holybro/kakuteh7mini/default.px4board
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CONFIG_COMMON_DIFFERENTIAL_PRESSURE=y
CONFIG_COMMON_DISTANCE_SENSOR=y
CONFIG_DRIVERS_DSHOT=y
CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
CONFIG_DRIVERS_IMU_BOSCH_BMI270=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
CONFIG_COMMON_LIGHT=y
Expand Down
9 changes: 6 additions & 3 deletions boards/holybro/kakuteh7mini/init/rc.board_sensors
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
#
# Holybro KakuteH7Mini specific board sensors init
#------------------------------------------------------------------------------
# v1.1=mpu6000 v1.3=bmi270 v1.5=icm42688p
board_adc start

if ! bmi270 -s -q start
if ! mpu6000 -R 6 -s -q start
then
icm42688p -R 0 -s start
if ! bmi270 -R 6 -s -q start
then
icm42688p -R 6 -s start
fi
fi

bmp280 -X start
5 changes: 3 additions & 2 deletions boards/holybro/kakuteh7mini/src/spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIDevice(DRV_OSD_DEVTYPE_ATXXXX, SPI::CS{GPIO::PortB, GPIO::Pin12}),
}),
initSPIBus(SPI::Bus::SPI4, {
//<V1.3s have the MPU series, latter ones have a BMI270
//<V1.1 have the mpu6000, v1.3 have a BMI270, v1.5 have a ICM42688P
initSPIDevice(DRV_IMU_DEVTYPE_MPU6000, SPI::CS{GPIO::PortE, GPIO::Pin4}, SPI::DRDY{GPIO::PortE, GPIO::Pin1}),
initSPIDevice(DRV_IMU_DEVTYPE_BMI270, SPI::CS{GPIO::PortE, GPIO::Pin4}, SPI::DRDY{GPIO::PortE, GPIO::Pin1})
initSPIDevice(DRV_IMU_DEVTYPE_BMI270, SPI::CS{GPIO::PortE, GPIO::Pin4}, SPI::DRDY{GPIO::PortE, GPIO::Pin1}),
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortE, GPIO::Pin4}, SPI::DRDY{GPIO::PortE, GPIO::Pin1})
}),
};

Expand Down

0 comments on commit efbd01c

Please sign in to comment.