mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
refactor mpu9250: use driver base class
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
adc start
|
||||
|
||||
# Onboard I2C
|
||||
mpu9250 -R 12 start
|
||||
mpu9250 -I -R 12 start
|
||||
|
||||
# I2C bypass of mpu
|
||||
lps25h -I start
|
||||
|
||||
@@ -16,7 +16,7 @@ mpu6000 -s -R 2 -T 20608 start
|
||||
mpu6000 -s -R 2 -T 20602 start
|
||||
|
||||
# Internal SPI bus mpu9250 is rotated 90 deg yaw
|
||||
mpu9250 -R 2 start
|
||||
mpu9250 -s -R 2 start
|
||||
|
||||
# Possible external compasses
|
||||
ist8310 -X start
|
||||
|
||||
@@ -18,7 +18,7 @@ mpu6000 -s -R 2 -T 20608 start
|
||||
mpu6000 -s -R 2 -T 20602 start
|
||||
|
||||
# Internal SPI bus mpu9250 is rotated 90 deg yaw
|
||||
mpu9250 -R 2 start
|
||||
mpu9250 -s -R 2 start
|
||||
|
||||
# Internal SPI
|
||||
ms5611 -s start
|
||||
|
||||
@@ -37,8 +37,8 @@ then
|
||||
set BOARD_FMUV3 20
|
||||
else
|
||||
# Check for Pixhawk 2.1 cube
|
||||
# external MPU9250 is rotated 180 degrees yaw
|
||||
if mpu9250 -S -R 4 start
|
||||
# (external) MPU9250 is rotated 180 degrees yaw
|
||||
if mpu9250 -s -R 4 start
|
||||
then
|
||||
set BOARD_FMUV3 21
|
||||
fi
|
||||
@@ -57,8 +57,8 @@ then
|
||||
set BOARD_FMUV3 20
|
||||
else
|
||||
# Check for Pixhack 3.1
|
||||
# external MPU9250 is rotated 180 degrees yaw
|
||||
if mpu9250 -S -R 4 start
|
||||
# (external) MPU9250 is rotated 180 degrees yaw
|
||||
if mpu9250 -s -R 4 start
|
||||
then
|
||||
set BOARD_FMUV3 21
|
||||
fi
|
||||
@@ -101,7 +101,7 @@ else
|
||||
# V3 build hwtypecmp supports V2|V2M|V30
|
||||
if ! ver hwtypecmp V2M
|
||||
then
|
||||
mpu9250 start
|
||||
mpu9250 -s start
|
||||
# else: On the PixhawkMini the mpu9250 has been disabled due to HW errata
|
||||
fi
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ then
|
||||
set BOARD_FMUV3 20
|
||||
else
|
||||
# Check for Pixhawk 2.1 cube
|
||||
# external MPU9250 is rotated 180 degrees yaw
|
||||
if mpu9250 -S -R 4 start
|
||||
# (external) MPU9250 is rotated 180 degrees yaw
|
||||
if mpu9250 -s -R 4 start
|
||||
then
|
||||
set BOARD_FMUV3 21
|
||||
fi
|
||||
@@ -58,8 +58,8 @@ then
|
||||
set BOARD_FMUV3 20
|
||||
else
|
||||
# Check for Pixhack 3.1
|
||||
# external MPU9250 is rotated 180 degrees yaw
|
||||
if mpu9250 -S -R 4 start
|
||||
# (external) MPU9250 is rotated 180 degrees yaw
|
||||
if mpu9250 -s -R 4 start
|
||||
then
|
||||
set BOARD_FMUV3 21
|
||||
fi
|
||||
@@ -109,7 +109,7 @@ else
|
||||
# V3 build hwtypecmp supports V2|V2M|V30
|
||||
if ! ver hwtypecmp V2M
|
||||
then
|
||||
mpu9250 start
|
||||
mpu9250 -s start
|
||||
# else: On the PixhawkMini the mpu9250 has been disabled due to HW errata
|
||||
fi
|
||||
|
||||
|
||||
@@ -24,13 +24,6 @@ rm3100 start
|
||||
# Internal SPI
|
||||
ms5611 -s start
|
||||
|
||||
# For Teal One airframe
|
||||
if param compare SYS_AUTOSTART 4250
|
||||
then
|
||||
mpu9250 -s -R 14 start
|
||||
mpu9250 -t -R 14 start
|
||||
fi
|
||||
|
||||
# hmc5883 internal SPI bus is rotated 90 deg yaw
|
||||
if ! hmc5883 -T -S -R 2 start
|
||||
then
|
||||
@@ -49,5 +42,11 @@ then
|
||||
icm20608g -R 8 start
|
||||
fi
|
||||
|
||||
# mpu9250 internal SPI bus mpu9250 is rotated 90 deg yaw
|
||||
mpu9250 -R 2 start
|
||||
# For Teal One airframe
|
||||
if param compare SYS_AUTOSTART 4250
|
||||
then
|
||||
mpu9250 -s -R 14 start
|
||||
else
|
||||
# mpu9250 internal SPI bus mpu9250 is rotated 90 deg yaw
|
||||
mpu9250 -s -R 2 start
|
||||
fi
|
||||
|
||||
@@ -14,7 +14,7 @@ icm20608g -R 8 start
|
||||
icm20602 -s -R 8 start
|
||||
|
||||
# Internal SPI bus mpu9250
|
||||
mpu9250 -R 2 start
|
||||
mpu9250 -s -R 2 start
|
||||
|
||||
# Internal SPI bus
|
||||
lis3mdl -R 0 start
|
||||
|
||||
@@ -18,7 +18,7 @@ then
|
||||
rgbled_ncp5623c start -X -a 0x38
|
||||
|
||||
#mpu6000 -s -R 4 -T 20608 start
|
||||
mpu9250 -R 4 start
|
||||
mpu9250 -s -R 4 start
|
||||
|
||||
# Default GNSS with LIS3MDL magnetometer with external i2c.
|
||||
lis3mdl -R 2 -X start
|
||||
@@ -27,7 +27,7 @@ fi
|
||||
# Draco
|
||||
if param compare SYS_AUTOSTART 4072
|
||||
then
|
||||
mpu9250 -R 2 start
|
||||
mpu9250 -s -R 2 start
|
||||
fi
|
||||
|
||||
# IFO
|
||||
@@ -39,6 +39,6 @@ then
|
||||
# IFO rgb LED
|
||||
pca9685 start
|
||||
|
||||
mpu9250 -R 2 start
|
||||
mpu9250 -s -R 2 start
|
||||
lis3mdl -R 2 -X start
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user