aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
authorJuchli D <juchlid@ethz.ch>2013-11-05 13:26:34 +0100
committerJuchli D <juchlid@ethz.ch>2013-11-05 13:26:34 +0100
commit4c9a4bc9a4686a2806a0119c262a744ca5517c02 (patch)
treee7e52d0f0b815136cecc6b40f994e979622d8b09 /ROMFS
parent56f1ea9266eacd689a7b4065231d94a78ea96de6 (diff)
downloadpx4-firmware-4c9a4bc9a4686a2806a0119c262a744ca5517c02.tar.gz
px4-firmware-4c9a4bc9a4686a2806a0119c262a744ca5517c02.tar.bz2
px4-firmware-4c9a4bc9a4686a2806a0119c262a744ca5517c02.zip
Added custom start up of bottle drop
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/px4fmu_common/init.d/900_bottle_drop_test46
-rwxr-xr-xROMFS/px4fmu_common/init.d/rcS6
2 files changed, 52 insertions, 0 deletions
diff --git a/ROMFS/px4fmu_common/init.d/900_bottle_drop_test b/ROMFS/px4fmu_common/init.d/900_bottle_drop_test
new file mode 100644
index 000000000..522f78210
--- /dev/null
+++ b/ROMFS/px4fmu_common/init.d/900_bottle_drop_test
@@ -0,0 +1,46 @@
+#!nsh
+
+echo "[init] bottle drop test
+
+#
+# Load default params for this platform
+#
+if param compare SYS_AUTOCONFIG 1
+then
+ # Set all params here, then disable autoconfig
+ param set SYS_AUTOCONFIG 0
+
+ param save
+fi
+
+#
+# Force some key parameters to sane values
+# MAV_TYPE 2 = quadrotor
+#
+param set MAV_TYPE 2
+
+set EXIT_ON_END no
+
+#
+# Start and configure PX4IO and FMU interface
+#
+# Start MAVLink (depends on orb)
+mavlink start
+usleep 5000
+
+
+sh /etc/init.d/rc.io
+
+fmu mode_pwm
+
+mixer load /dev/px4fmu /etc/mixers/FMU_pass.mix
+
+pwm arm -d /dev/px4fmu
+
+bottle_drop start
+
+
+if [ $EXIT_ON_END == yes ]
+then
+ exit
+fi
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index cff8446a6..6e954f58a 100755
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -309,6 +309,12 @@ then
set MODE custom
fi
+ if param compare SYS_AUTOSTART 900
+ then
+ sh /etc/init.d/900_bottle_drop_test
+ set MODE custom
+ fi
+
# Start any custom extensions that might be missing
if [ -f /fs/microsd/etc/rc.local ]
then