refactor mpu6000: use driver base class

This commit is contained in:
Beat Küng
2020-02-26 14:55:57 +01:00
committed by Daniel Agar
parent be0a205438
commit 969a77f889
14 changed files with 180 additions and 491 deletions
@@ -5,7 +5,7 @@
adc start
# Internal SPI bus ICM-20689
mpu6000 -R 8 -z -T 20689 start
mpu6000 -R 8 -s -T 20689 start
# Internal SPI bus BMI088 accel
bmi088 -A -R 10 start
@@ -8,7 +8,7 @@ adc start
# The default IMU is an ICM20689, but there might also be an MPU6000
if ! mpu6000 -R 12 -s start
then
mpu6000 -R 12 -z -T 20689 start
mpu6000 -R 12 -s -T 20689 start
fi
# Internal Baro
+2 -2
View File
@@ -10,10 +10,10 @@ hmc5883 -C -T -X start
lis3mdl -X start
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
mpu6000 -R 2 -T 20608 start
mpu6000 -s -R 2 -T 20608 start
# Internal SPI bus ICM-20602-G is rotated 90 deg yaw
mpu6000 -R 2 -T 20602 start
mpu6000 -s -R 2 -T 20602 start
# Internal SPI bus mpu9250 is rotated 90 deg yaw
mpu9250 -R 2 start
+2 -2
View File
@@ -12,10 +12,10 @@ ist8310 -X start
qmc5883 -X start
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
mpu6000 -R 2 -T 20608 start
mpu6000 -s -R 2 -T 20608 start
# Internal SPI bus ICM-20602-G is rotated 90 deg yaw
mpu6000 -R 2 -T 20602 start
mpu6000 -s -R 2 -T 20602 start
# Internal SPI bus mpu9250 is rotated 90 deg yaw
mpu9250 -R 2 start
@@ -21,7 +21,7 @@ adc start
mpu6000 -R 8 -s -T 20602 start
# Internal SPI bus ICM-20689
mpu6000 -R 8 -z -T 20689 start
mpu6000 -R 8 -s -T 20689 start
# Internal SPI bus BMI055 accel
bmi055 -A -R 10 start
+7 -7
View File
@@ -14,7 +14,7 @@ ist8310 -X start
hmc5883 -C -T -I -R 4 start
# Internal SPI bus ICM-20608-G
mpu6000 -T 20608 start
mpu6000 -s -T 20608 start
# External SPI
ms5611 -S start
@@ -28,8 +28,8 @@ set BOARD_FMUV3 0
if ver hwtypecmp V30
then
# Check for Pixhawk 2.0 cube
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -S -R 4 start
# MPU6K is rotated 180 degrees yaw
if mpu6000 -s -R 4 start
then
set BOARD_FMUV3 20
else
@@ -48,8 +48,8 @@ then
# Pixhawk Mini doesn't have these sensors,
# so if they are found we know its a Pixhack
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -S -R 4 start
# MPU6K is rotated 180 degrees yaw
if mpu6000 -s -R 4 start
then
set BOARD_FMUV3 20
else
@@ -79,7 +79,7 @@ then
if [ $BOARD_FMUV3 = 20 ]
then
# v2.0 internal MPU6000 is rotated 180 deg roll, 270 deg yaw
mpu6000 -R 14 start
mpu6000 -s -R 14 start
# v2.0 Has internal hmc5883 on SPI1
hmc5883 -C -T -S -R 8 start
@@ -94,7 +94,7 @@ then
else
# $BOARD_FMUV3 = 0 -> FMUv2
mpu6000 start
mpu6000 -s start
# As we will use the external mag and the ICM-20608-G
# V2 build hwtypecmp is always false
+7 -7
View File
@@ -15,7 +15,7 @@ qmc5883 -X start
hmc5883 -C -T -I -R 4 start
# Internal SPI bus ICM-20608-G
mpu6000 -T 20608 start
mpu6000 -s -T 20608 start
# External SPI
ms5611 -S start
@@ -29,8 +29,8 @@ set BOARD_FMUV3 0
if ver hwtypecmp V30
then
# Check for Pixhawk 2.0 cube
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -S -R 4 start
# MPU6K is rotated 180 degrees yaw
if mpu6000 -s -R 4 start
then
set BOARD_FMUV3 20
else
@@ -49,8 +49,8 @@ then
# Pixhawk Mini doesn't have these sensors,
# so if they are found we know its a Pixhack
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -S -R 4 start
# MPU6K is rotated 180 degrees yaw
if mpu6000 -s -R 4 start
then
set BOARD_FMUV3 20
else
@@ -87,7 +87,7 @@ then
if [ $BOARD_FMUV3 = 20 ]
then
# v2.0 internal MPU6000 is rotated 180 deg roll, 270 deg yaw
mpu6000 -R 14 start
mpu6000 -s -R 14 start
# v2.0 Has internal hmc5883 on SPI1
hmc5883 -C -T -S -R 8 start
@@ -102,7 +102,7 @@ then
else
# $BOARD_FMUV3 = 0 -> FMUv2
mpu6000 start
mpu6000 -s start
# As we will use the external mag and the ICM-20608-G
# V2 build hwtypecmp is always false
+1 -1
View File
@@ -10,7 +10,7 @@ mpu6000 -R 8 -s -T 20602 start
#icm20602 -R 6 start
# Internal SPI bus ICM-20689
mpu6000 -R 8 -z -T 20689 start
mpu6000 -R 8 -s -T 20689 start
#icm20689 -R 6 start
# new sensor drivers (in testing)
+1 -1
View File
@@ -14,7 +14,7 @@ then
# GPS LED
rgbled_ncp5623c start -a 0x38
#mpu6000 -R 4 -T 20608 start
#mpu6000 -s -R 4 -T 20608 start
mpu9250 -R 4 start
# Default GNSS with LIS3MDL magnetometer with external i2c.