move fmu-v2/v3 init to rc.board

This commit is contained in:
Daniel Agar
2018-11-30 14:13:54 -05:00
parent 6c2436c2ca
commit c6a502f150
6 changed files with 294 additions and 195 deletions

View File

@@ -21,67 +21,6 @@ if adc start
then
fi
if ver hwcmp PX4_FMU_V2
then
# External I2C bus
if hmc5883 -C -T -X start
then
fi
# External I2C bus
if lis3mdl -X start
then
fi
# Internal I2C bus
if hmc5883 -C -T -I -R 4 start
then
fi
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -X -R 4 start
then
set BOARD_FMUV3 true
else
set BOARD_FMUV3 false
fi
if [ $BOARD_FMUV3 = true ]
then
# external L3GD20H is rotated 180 degrees yaw
if l3gd20 -X -R 4 start
then
fi
# external LSM303D is rotated 270 degrees yaw
if lsm303d -X -R 6 start
then
fi
# internal MPU6000 is rotated 180 deg roll, 270 deg yaw
if mpu6000 -R 14 start
then
fi
if hmc5883 -C -T -S -R 8 start
then
fi
else
# FMUv2
if mpu6000 start
then
fi
if l3gd20 start
then
fi
if lsm303d start
then
fi
fi
fi
if ver hwcmp AIRMIND_MINDPX_V2
then
# External I2C bus

View File

@@ -5,6 +5,8 @@
set +e
set unit_test_failure 0
set BOARD_RC /etc/init.d/rc.board
uorb start
if rgbled start
@@ -61,6 +63,15 @@ else
echo "[param] FAILED loading $PARAM_FILE"
fi
#
# run boards rc.board if available
#
if [ -f $BOARD_RC ]
then
echo "Board init: ${BOARD_RC}"
sh $BOARD_RC
fi
if [ -f /etc/extras/px4_io-v2_default.bin ]
then
set io_file /etc/extras/px4_io-v2_default.bin