Skip to content

FIX diatone_mamba-f405-mk2 - mpu6500 #24760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions boards/diatone/mamba-f405-mk2/default.px4board
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CONFIG_DRIVERS_DSHOT=y
CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU6500=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU9250=y
CONFIG_DRIVERS_MAGNETOMETER_AKM_AK8963=y
CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
Expand Down
5 changes: 4 additions & 1 deletion boards/diatone/mamba-f405-mk2/init/rc.board_sensors
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

board_adc start

if ! mpu6000 -R 6 -s start
# fixme rotation
mpu6500 -R 6 -s start
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needed yaw270 autopilot rotation to compensate. afterwards IMU works fine


if ! mpu6500 -R 6 -s start
then
# some boards such as the Hobbywing XRotor F4 G2 use the ICM-20602
icm20602 -s -R 6 start
Expand Down
1 change: 1 addition & 0 deletions boards/diatone/mamba-f405-mk2/src/spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_IMU_DEVTYPE_MPU6000, SPI::CS{GPIO::PortA, GPIO::Pin4}),
initSPIDevice(DRV_IMU_DEVTYPE_MPU6500, SPI::CS{GPIO::PortA, GPIO::Pin4}),
initSPIDevice(DRV_IMU_DEVTYPE_ICM20602, SPI::CS{GPIO::PortA, GPIO::Pin4}),
}),
initSPIBus(SPI::Bus::SPI2, {
Expand Down
Loading