aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2013-08-24 20:32:46 +0200
committerAnton Babushkin <anton.babushkin@me.com>2013-08-24 20:32:46 +0200
commit41dfdfb1a4b974b5d32788852768513d0dac7a67 (patch)
tree4a6b746190655bc87171c929ca653d8cd72332e2 /ROMFS
parent8579d0b7c9f77c84fa9afa87f7ab2f353443a242 (diff)
downloadpx4-firmware-41dfdfb1a4b974b5d32788852768513d0dac7a67.tar.gz
px4-firmware-41dfdfb1a4b974b5d32788852768513d0dac7a67.tar.bz2
px4-firmware-41dfdfb1a4b974b5d32788852768513d0dac7a67.zip
Use common rc.multirotor script (now only in 01_fmu_quad_x).
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/px4fmu_common/init.d/01_fmu_quad_x33
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.multirotor49
2 files changed, 54 insertions, 28 deletions
diff --git a/ROMFS/px4fmu_common/init.d/01_fmu_quad_x b/ROMFS/px4fmu_common/init.d/01_fmu_quad_x
index c1f3187f9..8223b3ea5 100644
--- a/ROMFS/px4fmu_common/init.d/01_fmu_quad_x
+++ b/ROMFS/px4fmu_common/init.d/01_fmu_quad_x
@@ -62,44 +62,21 @@ param set MAV_TYPE 2
#
mavlink start -d /dev/ttyS0 -b 57600
usleep 5000
-
-#
-# Start the sensors and test them.
-#
-sh /etc/init.d/rc.sensors
-
-#
-# Start the commander.
-#
-commander start
#
-# Start GPS interface (depends on orb)
+# Start common for all multirotors apps
#
-gps start
-
+sh /etc/init.d/rc.multirotor
+
#
-# Start the attitude estimator
+# Start PWM output
#
-attitude_estimator_ekf start
-
-echo "[init] starting PWM output"
fmu mode_pwm
mixer load /dev/pwm_output /etc/mixers/FMU_quad_x.mix
pwm -u 400 -m 0xff
-#
-# Start attitude control
-#
-multirotor_att_control start
-
-#
-# Start logging
-#
-sdlog2 start -r 50 -a -b 14
-
# Try to get an USB console
nshterm /dev/ttyACM0 &
# Exit, because /dev/ttyS0 is needed for MAVLink
-exit
+#exit
diff --git a/ROMFS/px4fmu_common/init.d/rc.multirotor b/ROMFS/px4fmu_common/init.d/rc.multirotor
new file mode 100644
index 000000000..81184f363
--- /dev/null
+++ b/ROMFS/px4fmu_common/init.d/rc.multirotor
@@ -0,0 +1,49 @@
+#!nsh
+#
+# Standard everything needed for multirotors except mixer, output and mavlink
+#
+
+#
+# Start the sensors and test them.
+#
+sh /etc/init.d/rc.sensors
+
+#
+# Start the commander.
+#
+commander start
+
+#
+# Start GPS interface (depends on orb)
+#
+gps start
+
+#
+# Start the attitude estimator
+#
+attitude_estimator_ekf start
+
+#
+# Start position estimator
+#
+position_estimator_inav start
+
+#
+# Start attitude control
+#
+multirotor_att_control start
+
+#
+# Start position control
+#
+multirotor_pos_control start
+
+#
+# Start logging
+#
+if [ $BOARD == fmuv1 ]
+then
+ sdlog2 start -r 50 -a -b 16
+else
+ sdlog2 start -r 200 -a -b 16
+fi