px4-firmware/ROMFS/px4fmu_common/init.d/rc.usb

51 lines
773 B
Plaintext
Raw Normal View History

#!nsh
#
# USB MAVLink start
#
2013-03-22 09:17:04 -03:00
echo "Starting MAVLink on this USB console"
# Stop tone alarm
tone_alarm stop
# Tell MAVLink that this link is "fast"
if mavlink stop
then
echo "stopped other MAVLink instance"
fi
mavlink start -b 230400 -d /dev/ttyACM0
2013-07-18 11:17:47 -03:00
if [ $MODE == autostart ]
then
2013-07-18 11:17:47 -03:00
# Start the commander
commander start
2013-07-18 11:17:47 -03:00
# Start sensors
sh /etc/init.d/rc.sensors
# Start one of the estimators
if attitude_estimator_ekf status
then
2013-07-18 11:17:47 -03:00
echo "multicopter att filter running"
else
2013-07-18 11:17:47 -03:00
if att_pos_estimator_ekf status
then
echo "fixedwing att filter running"
else
attitude_estimator_ekf start
fi
fi
2013-07-18 11:17:47 -03:00
# Start GPS
if gps start
then
echo "GPS started"
fi
fi
2013-03-22 09:17:04 -03:00
echo "MAVLink started, exiting shell.."
# Exit shell to make it available to MAVLink
exit