aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-01-13 13:07:25 +0100
committerAnton Babushkin <anton.babushkin@me.com>2014-01-13 13:07:25 +0100
commit7bcddd192fba723d165957043163762b2e08d802 (patch)
treead3a7d1d7a901d5d7a984a3f3aaa1b175ca358ca /ROMFS
parent8d7620c3cbe86414b84917350bcc99b65cef9b0d (diff)
parentf224374ed3c84717b8c92a3f0d6d902c5701eb04 (diff)
downloadpx4-firmware-7bcddd192fba723d165957043163762b2e08d802.tar.gz
px4-firmware-7bcddd192fba723d165957043163762b2e08d802.tar.bz2
px4-firmware-7bcddd192fba723d165957043163762b2e08d802.zip
Merge branch 'navigator_new' into navigator_new_vector
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/px4fmu_test/init.d/rcS67
1 files changed, 66 insertions, 1 deletions
diff --git a/ROMFS/px4fmu_test/init.d/rcS b/ROMFS/px4fmu_test/init.d/rcS
index 6aa1d3d46..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
@@ -9,4 +10,68 @@ then
# Try to get an USB console
nshterm /dev/ttyACM0 &
-fi \ No newline at end of file
+fi
+
+#
+# Try to mount the microSD card.
+#
+echo "[init] looking for microSD..."
+if mount -t vfat /dev/mmcsd0 /fs/microsd
+then
+ echo "[init] card mounted at /fs/microsd"
+ # Start playing the startup tune
+ tone_alarm start
+else
+ echo "[init] no microSD card found"
+ # Play SOS
+ tone_alarm error
+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.txt ]
+then
+ tests mount
+fi