2012-08-04 15:12:36 -07:00
|
|
|
#!nsh
|
|
|
|
|
#
|
|
|
|
|
# Flight startup script for PX4FMU on PX4IOAR carrier board.
|
|
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
|
|
|
|
|
set USB no
|
|
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
echo "[init] doing PX4IOAR startup..."
|
2012-10-02 13:02:57 +02:00
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
|
|
|
|
# Start the ORB
|
|
|
|
|
#
|
|
|
|
|
uorb start
|
2012-10-02 13:02:57 +02:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Init the EEPROM
|
|
|
|
|
#
|
|
|
|
|
echo "[init] eeprom"
|
|
|
|
|
eeprom start
|
|
|
|
|
if [ -f /eeprom/parameters ]
|
|
|
|
|
then
|
2012-10-09 22:45:36 -07:00
|
|
|
param load
|
2012-10-02 13:02:57 +02:00
|
|
|
fi
|
|
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
|
|
|
|
# Start the sensors.
|
|
|
|
|
#
|
|
|
|
|
sh /etc/init.d/rc.sensors
|
2012-10-02 13:02:57 +02:00
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
|
|
|
|
# Start MAVLink
|
|
|
|
|
#
|
2012-08-19 16:32:54 +02:00
|
|
|
mavlink start -d /dev/ttyS0 -b 57600
|
2012-08-16 13:09:35 +02:00
|
|
|
usleep 5000
|
2012-10-02 13:02:57 +02:00
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
|
|
|
|
# Start the commander.
|
|
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
commander start
|
|
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
|
|
|
|
# Start the attitude estimator
|
|
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
attitude_estimator_ekf start
|
|
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
|
|
|
|
# Configure PX4FMU for operation with PX4IOAR
|
|
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
fmu mode_gpio_serial
|
|
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
# Fire up the multi rotor attitude controller
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
multirotor_att_control start
|
|
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
# Fire up the AR.Drone interface.
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
ardrone_interface start
|
2012-08-04 15:12:36 -07:00
|
|
|
|
|
|
|
|
#
|
2012-10-30 07:19:58 +01:00
|
|
|
# Start logging to microSD if we can
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
2012-10-30 07:19:58 +01:00
|
|
|
#sh /etc/init.d/rc.logging
|
2012-08-04 15:12:36 -07:00
|
|
|
|
|
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
# Start GPS capture
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
gps start
|
|
|
|
|
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
|
|
|
|
# startup is done; we don't want the shell because we
|
2012-10-02 13:02:57 +02:00
|
|
|
# use the same UART for telemetry
|
2012-08-04 15:12:36 -07:00
|
|
|
#
|
2012-10-02 13:02:57 +02:00
|
|
|
echo "[init] startup done"
|
|
|
|
|
exit
|