From 7106565e94ab683b3b9d4b6182bb123e018cbb8b Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 18 Jul 2013 16:17:47 +0200 Subject: [PATCH] Simplified USB startup script --- ROMFS/px4fmu_common/init.d/rc.usb | 40 +++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.usb b/ROMFS/px4fmu_common/init.d/rc.usb index 147521fd11..c89932bb5d 100644 --- a/ROMFS/px4fmu_common/init.d/rc.usb +++ b/ROMFS/px4fmu_common/init.d/rc.usb @@ -15,29 +15,33 @@ then fi mavlink start -b 230400 -d /dev/ttyACM0 -# Start the commander -commander start - -# Start sensors -sh /etc/init.d/rc.sensors - -# Start one of the estimators -if attitude_estimator_ekf status +if [ $MODE == autostart ] then - echo "multicopter att filter running" -else - if att_pos_estimator_ekf status + + # Start the commander + commander start + + # Start sensors + sh /etc/init.d/rc.sensors + + # Start one of the estimators + if attitude_estimator_ekf status then - echo "fixedwing att filter running" + echo "multicopter att filter running" else - attitude_estimator_ekf start + if att_pos_estimator_ekf status + then + echo "fixedwing att filter running" + else + attitude_estimator_ekf start + fi fi -fi -# Start GPS -if gps start -then - echo "GPS started" + # Start GPS + if gps start + then + echo "GPS started" + fi fi echo "MAVLink started, exiting shell.."