diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-01-04 17:05:52 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-01-04 17:05:52 +0100 |
commit | 7590d91cf24d7fdd9bc0167958eba16cf584c67c (patch) | |
tree | cd82e1ce74e6eee9c0fb813deb7d7dc093544685 /ROMFS/px4fmu_test | |
parent | 05649eb09c0ad26e64d42471bf091dc7ee6ce5fb (diff) | |
download | px4-firmware-7590d91cf24d7fdd9bc0167958eba16cf584c67c.tar.gz px4-firmware-7590d91cf24d7fdd9bc0167958eba16cf584c67c.tar.bz2 px4-firmware-7590d91cf24d7fdd9bc0167958eba16cf584c67c.zip |
Improved mount test
Diffstat (limited to 'ROMFS/px4fmu_test')
-rw-r--r-- | ROMFS/px4fmu_test/init.d/rcS | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/ROMFS/px4fmu_test/init.d/rcS b/ROMFS/px4fmu_test/init.d/rcS index d8ed71f12..56482d140 100644 --- a/ROMFS/px4fmu_test/init.d/rcS +++ b/ROMFS/px4fmu_test/init.d/rcS @@ -2,6 +2,7 @@ # # PX4FMU startup script for test hackery. # +uorb start if sercon then @@ -27,9 +28,50 @@ else fi # +# Start a minimal system +# + +if [ -f /etc/extras/px4io-v2_default.bin ] +then + set io_file /etc/extras/px4io-v2_default.bin +else + set io_file /etc/extras/px4io-v1_default.bin +fi + +if px4io start +then + echo "PX4IO OK" +fi + +if px4io checkcrc $io_file +then + echo "PX4IO CRC OK" +else + echo "PX4IO CRC failure" + tone_alarm MBABGP + if px4io forceupdate 14662 $io_file + then + usleep 500000 + if px4io start + then + echo "PX4IO restart OK" + tone_alarm MSPAA + else + echo "PX4IO restart failed" + tone_alarm MNGGG + sleep 5 + reboot + fi + else + echo "PX4IO update failed" + tone_alarm MNGGG + fi +fi + +# # The presence of this file suggests we're running a mount stress test # -if [ -f /fs/microsd/mount_test_cmds ] +if [ -f /fs/microsd/mount_test_cmds.txt ] then tests mount fi |