aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/px4fmu_common/init.d/rcS30
-rw-r--r--ROMFS/px4fmu_test/init.d/rcS67
2 files changed, 86 insertions, 11 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index f122921c5..ed034877f 100644
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -75,14 +75,15 @@ then
#
# Load microSD params
#
- #if ramtron start
- #then
- # param select /ramtron/params
- # if [ -f /ramtron/params ]
- # then
- # param load /ramtron/params
- # fi
- #else
+ if mtd start
+ then
+ param select /fs/mtd_params
+ if param load /fs/mtd_params
+ then
+ else
+ echo "FAILED LOADING PARAMS"
+ fi
+ else
param select /fs/microsd/params
if [ -f /fs/microsd/params ]
then
@@ -93,7 +94,7 @@ then
echo "Parameter file corrupt - ignoring"
fi
fi
- #fi
+ fi
#
# Start system state indicator
@@ -213,7 +214,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
@@ -277,6 +280,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