aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-07-07 12:22:56 -0700
committerpx4dev <px4@purgatory.org>2013-07-07 12:22:56 -0700
commit43f1843cc750fcef07122feaeca07863ed28c036 (patch)
tree77f0192152038670fe5a875a2a38232b28e7d044 /ROMFS
parent9fe257c4d151280c770e607bc3160703f9503889 (diff)
parentcf2dbdf9a1ae06c7d0e0a7963916a3709a1bc075 (diff)
downloadpx4-firmware-43f1843cc750fcef07122feaeca07863ed28c036.tar.gz
px4-firmware-43f1843cc750fcef07122feaeca07863ed28c036.tar.bz2
px4-firmware-43f1843cc750fcef07122feaeca07863ed28c036.zip
Merge branch 'master' of https://github.com/PX4/Firmware into fmuv2_bringup
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.PX4IOAR_PX4FLOW_example94
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.hil4
-rwxr-xr-xROMFS/px4fmu_common/init.d/rcS23
3 files changed, 102 insertions, 19 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.PX4IOAR_PX4FLOW_example b/ROMFS/px4fmu_common/init.d/rc.PX4IOAR_PX4FLOW_example
new file mode 100644
index 000000000..e7173f6e6
--- /dev/null
+++ b/ROMFS/px4fmu_common/init.d/rc.PX4IOAR_PX4FLOW_example
@@ -0,0 +1,94 @@
+#!nsh
+#
+# Flight startup script for PX4FMU on PX4IOAR carrier board.
+#
+
+# Disable the USB interface
+set USB no
+
+# Disable autostarting other apps
+set MODE ardrone
+
+echo "[init] doing PX4IOAR startup..."
+
+#
+# Start the ORB
+#
+uorb start
+
+#
+# Load microSD params
+#
+echo "[init] loading microSD params"
+param select /fs/microsd/params
+if [ -f /fs/microsd/params ]
+then
+ param load /fs/microsd/params
+fi
+
+#
+# Force some key parameters to sane values
+# MAV_TYPE 1 = fixed wing, 2 = quadrotor, 13 = hexarotor
+# see https://pixhawk.ethz.ch/mavlink/
+#
+param set MAV_TYPE 2
+
+#
+# Configure PX4FMU for operation with PX4IOAR
+#
+fmu mode_gpio_serial
+
+#
+# Start the sensors.
+#
+sh /etc/init.d/rc.sensors
+
+#
+# Start MAVLink and MAVLink Onboard (Flow Sensor)
+#
+mavlink start -d /dev/ttyS0 -b 57600
+mavlink_onboard start -d /dev/ttyS3 -b 115200
+usleep 5000
+
+#
+# Start the commander.
+#
+commander start
+
+#
+# Start the attitude estimator
+#
+attitude_estimator_ekf start
+
+#
+# Start the position estimator
+#
+flow_position_estimator start
+
+#
+# Fire up the multi rotor attitude controller
+#
+multirotor_att_control start
+
+#
+# Fire up the flow position controller
+#
+flow_position_control start
+
+#
+# Fire up the flow speed controller
+#
+flow_speed_control start
+
+#
+# Fire up the AR.Drone interface.
+#
+ardrone_interface start -d /dev/ttyS1
+
+#
+# startup is done; we don't want the shell because we
+# use the same UART for telemetry
+#
+echo "[init] startup done"
+
+exit
diff --git a/ROMFS/px4fmu_common/init.d/rc.hil b/ROMFS/px4fmu_common/init.d/rc.hil
index 7614ac0fe..3517a5bd8 100644
--- a/ROMFS/px4fmu_common/init.d/rc.hil
+++ b/ROMFS/px4fmu_common/init.d/rc.hil
@@ -54,13 +54,13 @@ sh /etc/init.d/rc.sensors
#
# Start the attitude estimator (depends on orb)
#
-kalman_demo start
+att_pos_estimator_ekf start
#
# Load mixer and start controllers (depends on px4io)
#
mixer load /dev/pwm_output /etc/mixers/FMU_AET.mix
-control_demo start
+fixedwing_backside start
echo "[HIL] setup done, running"
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index c0a70f7dd..22dec87cb 100755
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -1,17 +1,6 @@
#!nsh
#
# PX4FMU startup script.
-#
-# This script is responsible for:
-#
-# - mounting the microSD card (if present)
-# - running the user startup script from the microSD card (if present)
-# - detecting the configuration of the system and picking a suitable
-# startup script to continue with
-#
-# Note: DO NOT add configuration-specific commands to this script;
-# add them to the per-configuration scripts instead.
-#
#
# Default to auto-start mode. An init script on the microSD card
@@ -21,11 +10,6 @@ set MODE autostart
set USB autoconnect
#
-
-#
-
-
-#
# Try to mount the microSD card.
#
echo "[init] looking for microSD..."
@@ -69,7 +53,12 @@ else
then
echo "[init] USB interface connected"
else
- echo "[init] No USB connected"
+ if [ -f /dev/ttyACM0 ]
+ echo "[init] NSH via USB"
+ then
+ else
+ echo "[init] No USB connected"
+ fi
fi
fi