aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_common/init.d/rc.usb
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-07-18 16:17:47 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-07-18 16:17:47 +0200
commit7106565e94ab683b3b9d4b6182bb123e018cbb8b (patch)
treef15ab39bf0e1e0d8b1daa9736c9d28802f64367c /ROMFS/px4fmu_common/init.d/rc.usb
parentda54659b5e2c883c504cc48b82a03504cdaae6af (diff)
downloadpx4-firmware-7106565e94ab683b3b9d4b6182bb123e018cbb8b.tar.gz
px4-firmware-7106565e94ab683b3b9d4b6182bb123e018cbb8b.tar.bz2
px4-firmware-7106565e94ab683b3b9d4b6182bb123e018cbb8b.zip
Simplified USB startup script
Diffstat (limited to 'ROMFS/px4fmu_common/init.d/rc.usb')
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.usb38
1 files changed, 21 insertions, 17 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.usb b/ROMFS/px4fmu_common/init.d/rc.usb
index 147521fd1..c89932bb5 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
+if [ $MODE == autostart ]
+then
-# Start sensors
-sh /etc/init.d/rc.sensors
+ # Start the commander
+ commander start
-# Start one of the estimators
-if attitude_estimator_ekf status
-then
- echo "multicopter att filter running"
-else
- if att_pos_estimator_ekf status
+ # 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.."