From 5d356ec3d841602cbe7668028d01e670c3411d4e Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 2 Aug 2013 13:51:46 +0200 Subject: Fixed USB startup --- ROMFS/px4fmu_common/init.d/rc.usb | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'ROMFS/px4fmu_common/init.d/rc.usb') diff --git a/ROMFS/px4fmu_common/init.d/rc.usb b/ROMFS/px4fmu_common/init.d/rc.usb index c89932bb5..7e28f3d81 100644 --- a/ROMFS/px4fmu_common/init.d/rc.usb +++ b/ROMFS/px4fmu_common/init.d/rc.usb @@ -13,35 +13,35 @@ if mavlink stop then echo "stopped other MAVLink instance" fi +sleep 2 mavlink start -b 230400 -d /dev/ttyACM0 -if [ $MODE == autostart ] +# Start the commander +if commander start then + echo "Commander started" +fi - # Start the commander - commander start - - # Start sensors - sh /etc/init.d/rc.sensors +# Start sensors +sh /etc/init.d/rc.sensors - # Start one of the estimators - if attitude_estimator_ekf status +# Start one of the estimators +if attitude_estimator_ekf status +then + echo "multicopter att filter running" +else + if att_pos_estimator_ekf status then - echo "multicopter att filter running" + echo "fixedwing att filter running" else - if att_pos_estimator_ekf status - then - echo "fixedwing att filter running" - else - attitude_estimator_ekf start - fi + attitude_estimator_ekf start fi +fi - # Start GPS - if gps start - then - echo "GPS started" - fi +# Start GPS +if gps start +then + echo "GPS started" fi echo "MAVLink started, exiting shell.." -- cgit v1.2.3