diff options
author | px4dev <px4@purgatory.org> | 2013-04-26 12:35:45 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-04-26 12:35:45 -0700 |
commit | 187f7603b9e3ccbf5ac858d250931d583b52d9eb (patch) | |
tree | 059af67adc5fc7edbcf2b15cdd28cf07e7cf3eb6 /ROMFS/scripts/rc.PX4IOAR | |
parent | 9169ceb3f4884a863d527c6b8e7ea237b41a48ce (diff) | |
parent | 3acdc9d4ce3d83af6bb7f953e466620be690658e (diff) | |
download | px4-firmware-187f7603b9e3ccbf5ac858d250931d583b52d9eb.tar.gz px4-firmware-187f7603b9e3ccbf5ac858d250931d583b52d9eb.tar.bz2 px4-firmware-187f7603b9e3ccbf5ac858d250931d583b52d9eb.zip |
Merge branch 'export-build' into fmuv2_bringup
Sync with master via export-build.
Diffstat (limited to 'ROMFS/scripts/rc.PX4IOAR')
-rw-r--r-- | ROMFS/scripts/rc.PX4IOAR | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/ROMFS/scripts/rc.PX4IOAR b/ROMFS/scripts/rc.PX4IOAR new file mode 100644 index 000000000..6af91992e --- /dev/null +++ b/ROMFS/scripts/rc.PX4IOAR @@ -0,0 +1,99 @@ +#!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 + +# +# Init the parameter storage +# +echo "[init] loading microSD params" +param select /fs/microsd/parameters +if [ -f /fs/microsd/parameters ] +then + param load /fs/microsd/parameters +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 +# +mavlink start -d /dev/ttyS0 -b 57600 +usleep 5000 + +# +# Start the commander. +# +commander start + +# +# Start the attitude estimator +# +attitude_estimator_ekf start + +# +# Fire up the multi rotor attitude controller +# +multirotor_att_control start + +# +# Fire up the AR.Drone interface. +# +ardrone_interface start -d /dev/ttyS1 + +# +# Start logging +# +sdlog start -s 10 + +# +# Start GPS capture +# +gps start + +# +# Start system state +# +if blinkm start +then + echo "using BlinkM for state indication" + blinkm systemstate +else + echo "no BlinkM found, OK." +fi + +# +# startup is done; we don't want the shell because we +# use the same UART for telemetry +# +echo "[init] startup done" + +exit
\ No newline at end of file |