mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 11:31:36 +08:00
ROMFS startup cleanup
This commit is contained in:
@@ -442,7 +442,6 @@ then
|
|||||||
|
|
||||||
if [ $GPS == yes ]
|
if [ $GPS == yes ]
|
||||||
then
|
then
|
||||||
echo "[i] Start GPS"
|
|
||||||
if [ $GPS_FAKE == yes ]
|
if [ $GPS_FAKE == yes ]
|
||||||
then
|
then
|
||||||
echo "[i] Faking GPS"
|
echo "[i] Faking GPS"
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ fi
|
|||||||
#
|
#
|
||||||
# Try to mount the microSD card.
|
# Try to mount the microSD card.
|
||||||
#
|
#
|
||||||
echo "[i] looking for microSD..."
|
mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
if [ $? == 0 ]
|
||||||
then
|
then
|
||||||
echo "[i] card mounted at /fs/microsd"
|
echo "[i] card mounted at /fs/microsd"
|
||||||
# Start playing the startup tune
|
# Start playing the startup tune
|
||||||
@@ -40,7 +40,8 @@ else
|
|||||||
set io_file /etc/extras/px4io-v1_default.bin
|
set io_file /etc/extras/px4io-v1_default.bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if px4io start
|
px4io start
|
||||||
|
if [ $? == 0 ]
|
||||||
then
|
then
|
||||||
echo "PX4IO OK"
|
echo "PX4IO OK"
|
||||||
else
|
else
|
||||||
@@ -48,7 +49,8 @@ else
|
|||||||
set unit_test_failure_list "${unit_test_failure_list} px4io_start"
|
set unit_test_failure_list "${unit_test_failure_list} px4io_start"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if px4io checkcrc $io_file
|
px4io checkcrc $io_file
|
||||||
|
if [ $? == 0 ]
|
||||||
then
|
then
|
||||||
echo "PX4IO CRC OK"
|
echo "PX4IO CRC OK"
|
||||||
else
|
else
|
||||||
@@ -87,45 +89,52 @@ fi
|
|||||||
# Add new unit tests using the same pattern as below.
|
# Add new unit tests using the same pattern as below.
|
||||||
#
|
#
|
||||||
|
|
||||||
if mavlink_tests
|
mavlink_tests
|
||||||
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
else
|
|
||||||
set unit_test_failure 1
|
set unit_test_failure 1
|
||||||
set unit_test_failure_list "${unit_test_failure_list} mavlink_tests"
|
set unit_test_failure_list "${unit_test_failure_list} mavlink_tests"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if commander_tests
|
commander_tests
|
||||||
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
else
|
|
||||||
set unit_test_failure 1
|
set unit_test_failure 1
|
||||||
set unit_test_failure_list "${unit_test_failure_list} commander_tests"
|
set unit_test_failure_list "${unit_test_failure_list} commander_tests"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if uorb test
|
uorb test
|
||||||
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
else
|
|
||||||
set unit_test_failure 1
|
set unit_test_failure 1
|
||||||
set unit_test_failure_list "${unit_test_failure_list} uorb_tests"
|
set unit_test_failure_list "${unit_test_failure_list} uorb_tests"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if hmc5883 -I start
|
adc start
|
||||||
|
hmc5883 -I -S start
|
||||||
|
if [ $? != 0 ]
|
||||||
then
|
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
|
# 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
|
ms5611 start
|
||||||
mpu6000 start
|
mpu6000 start
|
||||||
lsm303d start
|
lsm303d start
|
||||||
l3gd20 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
|
fi
|
||||||
|
|
||||||
if [ $unit_test_failure == 0 ]
|
if [ $unit_test_failure == 0 ]
|
||||||
@@ -136,3 +145,5 @@ else
|
|||||||
echo
|
echo
|
||||||
echo "Some Unit Tests FAILED:${unit_test_failure_list}"
|
echo "Some Unit Tests FAILED:${unit_test_failure_list}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ver all
|
||||||
|
|||||||
Reference in New Issue
Block a user