aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-01-11 00:49:30 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-01-11 00:49:30 +0100
commitf224374ed3c84717b8c92a3f0d6d902c5701eb04 (patch)
treeceac332161dccf395126da4c758f7474be3f9c5d /ROMFS
parentac7787e2a2a2439a5fa47755dda3f775568330dd (diff)
parent6604d7b9479df29227797d47aee35db27e88865c (diff)
downloadpx4-firmware-f224374ed3c84717b8c92a3f0d6d902c5701eb04.tar.gz
px4-firmware-f224374ed3c84717b8c92a3f0d6d902c5701eb04.tar.bz2
px4-firmware-f224374ed3c84717b8c92a3f0d6d902c5701eb04.zip
Merge remote-tracking branch 'upstream/master' into navigator_new
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/px4fmu_common/init.d/rcS11
-rw-r--r--ROMFS/px4fmu_test/init.d/rcS67
2 files changed, 76 insertions, 2 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index 39c8384a7..90f2e2b17 100644
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -223,7 +223,9 @@ then
# 7000 .. 7999 Hexa +
# 8000 .. 8999 Octo X
# 9000 .. 9999 Octo +
- # 10000 .. 19999 Wide arm / H frame
+ # 10000 .. 10999 Wide arm / H frame
+ # 11000 .. 11999 Hexa Cox
+ # 12000 .. 12999 Octo Cox
if param compare SYS_AUTOSTART 4008 8
then
@@ -287,6 +289,13 @@ then
sh /etc/init.d/rc.octo
set MODE custom
fi
+
+ if param compare SYS_AUTOSTART 12001
+ then
+ set MIXER /etc/mixers/FMU_octo_cox.mix
+ sh /etc/init.d/rc.octo
+ set MODE custom
+ fi
if param compare SYS_AUTOSTART 10015 15
then
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