Files
bizhang_-obav/boards/px4/fmu-v5x/init/rc.board_sensors
Lorenz Meier 4c9b2c65b5 Support v5X build variants
This adds support for the different implementation variants of the v5X standard.
2021-02-14 11:17:28 +01:00

60 lines
1.1 KiB
Bash

#!/bin/sh
#
# PX4 FMUv5X specific board sensors init
#------------------------------------------------------------------------------
board_adc start
# Start Digital power monitors
ina226 -X -b 1 -t 1 -k start
ina226 -X -b 2 -t 2 -k start
if ver hwtypecmp V5X90 V5X91 V5Xa0 V5Xa1
then
#SKYNODE base fmu board orientation
# Internal SPI BMI088
bmi088 -A -R 2 -s start
bmi088 -G -R 2 -s start
# Internal SPI bus ICM42688p
icm42688p -R 4 -s start
# Internal SPI bus ICM-20602 (hard-mounted)
icm20602 -R 8 -s start
# Internal magnetometer on I2c
bmm150 -I -R 6 start
else
#FMUv5Xbase board orientation
# Internal SPI BMI088
bmi088 -A -R 4 -s start
bmi088 -G -R 4 -s start
# Internal SPI bus ICM42688p
icm42688p -R 6 -s start
# Internal SPI bus ICM-20602 (hard-mounted)
icm20602 -R 10 -s start
# Internal magnetometer on I2c
bmm150 -I start
fi
# Possible internal Baro
# Disable startup of internal baros if param is set to false
if param compare SENS_INT_BARO_EN 1
then
bmp388 -I -a 0x77 start
if ver hwtypecmp V5X91 V5Xa1
then
bmp388 -X -b 2 start
else
bmp388 -I start
fi
fi