move fmu-v4 init to rc.board

This commit is contained in:
Daniel Agar
2018-11-30 14:05:31 -05:00
parent 25799c6e75
commit d940f500f6
5 changed files with 96 additions and 106 deletions
-60
View File
@@ -22,17 +22,6 @@ then
fmu i2c 2 100000
fi
if ver hwcmp PX4_FMU_V4
then
# We know there are sketchy boards out there
# as chinese companies produce Pixracers without
# fully understanding the critical parts of the
# schematic and BOM, leading to sensor brownouts
# on boot. Original Pixracers following the
# open hardware design do not require this.
fmu sensor_reset 50
fi
# External SPI
ms5611 -S start
@@ -255,55 +244,6 @@ then
fi
fi
if ver hwcmp PX4_FMU_V4
then
# External I2C bus
hmc5883 -C -T -X start
lis3mdl -X start
ist8310 start
bmp280 -I start
# expansion i2c used for BMM150 rotated by 90deg
bmm150 -R 2 start
# hmc5883 internal SPI bus is rotated 90 deg yaw
if ! hmc5883 -C -T -S -R 2 start
then
# lis3mdl internal SPI bus is rotated 90 deg yaw
if ! lis3mdl start
then
# BMI055 gyro internal SPI bus
bmi055 -G start
fi
fi
# Start either ICM2060X or BMI055. They are both connected to the same SPI bus and use the same
# chip select pin. There are different boards with either one of them and the WHO_AM_I register
# will prevent the incorrect driver from a successful initialization.
# ICM20602 internal SPI bus ICM-20608-G is rotated 90 deg yaw
if ! mpu6000 -R 2 -T 20602 start
then
# ICM20608 internal SPI bus ICM-20602-G is rotated 90 deg yaw
if ! mpu6000 -R 2 -T 20608 start
then
# BMI055 accel internal SPI bus
bmi055 -A start
fi
fi
# Start either MPU9250 or BMI160. They are both connected to the same SPI bus and use the same
# chip select pin. There are different boards with either one of them and the WHO_AM_I register
# will prevent the incorrect driver from a successful initialization.
# mpu9250 internal SPI bus mpu9250 is rotated 90 deg yaw
if ! mpu9250 -R 2 start
then
# BMI160 internal SPI bus
bmi160 start
fi
fi
if ver hwcmp PX4_FMU_V4PRO
then
# Internal SPI bus ICM-20608-G