forked from Archive/PX4-Autopilot
ROMFS startup cleanup
This commit is contained in:
parent
a4a3b1b25f
commit
44fea268d9
|
@ -442,7 +442,6 @@ then
|
|||
|
||||
if [ $GPS == yes ]
|
||||
then
|
||||
echo "[i] Start GPS"
|
||||
if [ $GPS_FAKE == yes ]
|
||||
then
|
||||
echo "[i] Faking GPS"
|
||||
|
|
|
@ -17,8 +17,8 @@ fi
|
|||
#
|
||||
# Try to mount the microSD card.
|
||||
#
|
||||
echo "[i] looking for microSD..."
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo "[i] card mounted at /fs/microsd"
|
||||
# Start playing the startup tune
|
||||
|
@ -40,7 +40,8 @@ else
|
|||
set io_file /etc/extras/px4io-v1_default.bin
|
||||
fi
|
||||
|
||||
if px4io start
|
||||
px4io start
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo "PX4IO OK"
|
||||
else
|
||||
|
@ -48,7 +49,8 @@ else
|
|||
set unit_test_failure_list "${unit_test_failure_list} px4io_start"
|
||||
fi
|
||||
|
||||
if px4io checkcrc $io_file
|
||||
px4io checkcrc $io_file
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo "PX4IO CRC OK"
|
||||
else
|
||||
|
@ -87,45 +89,52 @@ fi
|
|||
# Add new unit tests using the same pattern as below.
|
||||
#
|
||||
|
||||
if mavlink_tests
|
||||
mavlink_tests
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} mavlink_tests"
|
||||
fi
|
||||
|
||||
if commander_tests
|
||||
commander_tests
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} commander_tests"
|
||||
fi
|
||||
|
||||
if uorb test
|
||||
uorb test
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} uorb_tests"
|
||||
fi
|
||||
|
||||
if hmc5883 -I start
|
||||
adc start
|
||||
hmc5883 -I -S start
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
# This is an FMUv3
|
||||
echo "FMUv3"
|
||||
ms5611 start
|
||||
mpu6000 -X start
|
||||
mpu6000 start
|
||||
lsm303d -X start
|
||||
l3gd20 -X start
|
||||
echo "EVALUATION ONLY SENSORS (not used in production)"
|
||||
ms5611 -X start
|
||||
else
|
||||
# This is an FMUv1 or FMUv2
|
||||
echo "FMUv2 (or FMUv3 where 'hmc5883 -I start' failed)"
|
||||
echo "FMUv2 (or FMUv3 where 'hmc5883 -I -S start' failed)"
|
||||
ms5611 start
|
||||
mpu6000 start
|
||||
lsm303d start
|
||||
l3gd20 start
|
||||
else
|
||||
# This is a FMUv3
|
||||
echo "FMUv3"
|
||||
mpu6000 -X start
|
||||
mpu6000 start
|
||||
lsm303d -X start
|
||||
l3gd20 -X start
|
||||
ms5611 start
|
||||
fi
|
||||
|
||||
tests all
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} system_tests"
|
||||
fi
|
||||
|
||||
if [ $unit_test_failure == 0 ]
|
||||
|
@ -136,3 +145,5 @@ else
|
|||
echo
|
||||
echo "Some Unit Tests FAILED:${unit_test_failure_list}"
|
||||
fi
|
||||
|
||||
ver all
|
||||
|
|
Loading…
Reference in New Issue