aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_common/init.d/10_io_f330
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2013-08-25 19:27:11 +0200
committerAnton Babushkin <anton.babushkin@me.com>2013-08-25 19:27:11 +0200
commit557d3f22de25a392995f2803363f32fdbc6ce843 (patch)
treeb7e2e353e46b69280cd2b23e4cd284fc31d9f411 /ROMFS/px4fmu_common/init.d/10_io_f330
parent41dfdfb1a4b974b5d32788852768513d0dac7a67 (diff)
downloadpx4-firmware-557d3f22de25a392995f2803363f32fdbc6ce843.tar.gz
px4-firmware-557d3f22de25a392995f2803363f32fdbc6ce843.tar.bz2
px4-firmware-557d3f22de25a392995f2803363f32fdbc6ce843.zip
Startup scripts major cleanup
Diffstat (limited to 'ROMFS/px4fmu_common/init.d/10_io_f330')
-rw-r--r--ROMFS/px4fmu_common/init.d/10_io_f33080
1 files changed, 15 insertions, 65 deletions
diff --git a/ROMFS/px4fmu_common/init.d/10_io_f330 b/ROMFS/px4fmu_common/init.d/10_io_f330
index 50842764a..7b6509bf8 100644
--- a/ROMFS/px4fmu_common/init.d/10_io_f330
+++ b/ROMFS/px4fmu_common/init.d/10_io_f330
@@ -1,12 +1,6 @@
#!nsh
-#
-# Flight startup script for PX4FMU+PX4IO on an F330 quad.
-#
-#
-# Start the ORB (first app to start)
-#
-uorb start
+echo "[init] 10_io_f330: PX4FMU+PX4IO on a DJI F330 quad frame"
#
# Load default params for this platform
@@ -35,8 +29,7 @@ fi
#
# Force some key parameters to sane values
-# MAV_TYPE 1 = fixed wing, 2 = quadrotor, 13 = hexarotor
-# see https://pixhawk.ethz.ch/mavlink/
+# MAV_TYPE 2 = quadrotor
#
param set MAV_TYPE 2
@@ -47,71 +40,28 @@ mavlink start
usleep 5000
#
-# Start the commander (depends on orb, mavlink)
+# Start and configure PX4IO interface
#
-commander start
+sh /etc/init.d/rc.io
#
-# Start PX4IO interface (depends on orb, commander)
+# Set PWM values for DJI ESCs
#
-if px4io start
-then
- #
- # This sets a PWM right after startup (regardless of safety button)
- #
- px4io idle 900 900 900 900
-
- pwm -u 400 -m 0xff
-
- #
- # Allow PX4IO to recover from midair restarts.
- # this is very unlikely, but quite safe and robust.
- px4io recovery
-
-
-
- #
- # The values are for spinning motors when armed using DJI ESCs
- #
- px4io min 1200 1200 1200 1200
-
- #
- # Upper limits could be higher, this is on the safe side
- #
- px4io max 1800 1800 1800 1800
+px4io idle 900 900 900 900
+px4io min 1200 1200 1200 1200
+px4io max 1800 1800 1800 1800
- mixer load /dev/pwm_output /etc/mixers/FMU_quad_x.mix
-
-else
- # SOS
- tone_alarm 6
-fi
-
-#
-# Start the sensors (depends on orb, px4io)
-#
-sh /etc/init.d/rc.sensors
-
#
-# Start GPS interface (depends on orb)
+# Load mixer
#
-gps start
-
+mixer load /dev/pwm_output /etc/mixers/FMU_quad_x.mix
+
#
-# Start the attitude estimator (depends on orb)
+# Set PWM output frequency
#
-attitude_estimator_ekf start
-
-multirotor_att_control start
+pwm -u 400 -m 0xff
#
-# Disable px4io topic limiting and start logging
+# Start common for all multirotors apps
#
-if [ $BOARD == fmuv1 ]
-then
- px4io limit 200
- sdlog2 start -r 50 -a -b 16
-else
- px4io limit 400
- sdlog2 start -r 200 -a -b 16
-fi
+sh /etc/init.d/rc.multirotor