aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_common/init.d/rc.usb
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2013-08-15 10:33:45 +0200
committerAnton Babushkin <anton.babushkin@me.com>2013-08-15 10:33:45 +0200
commit7476b03543f879df5ea29d44be147ff4926f8216 (patch)
treee1c056fa3e12b2c2c3ae601ae2835ac086b60338 /ROMFS/px4fmu_common/init.d/rc.usb
parent39ae01dd07d53e3509826ae3737fc6a509adec34 (diff)
parentd2f19c7d84030ad6ed1f6c17538fa96864c5dcef (diff)
downloadpx4-firmware-7476b03543f879df5ea29d44be147ff4926f8216.tar.gz
px4-firmware-7476b03543f879df5ea29d44be147ff4926f8216.tar.bz2
px4-firmware-7476b03543f879df5ea29d44be147ff4926f8216.zip
Merge branch 'master' into new_state_machine_drton
Diffstat (limited to 'ROMFS/px4fmu_common/init.d/rc.usb')
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.usb49
1 files changed, 30 insertions, 19 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.usb b/ROMFS/px4fmu_common/init.d/rc.usb
index c89932bb5..5b1bd272e 100644
--- a/ROMFS/px4fmu_common/init.d/rc.usb
+++ b/ROMFS/px4fmu_common/init.d/rc.usb
@@ -13,35 +13,46 @@ 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 px4io if present
+if px4io start
+then
+ echo "PX4IO driver started"
+else
+ if fmu mode_serial
+ then
+ echo "FMU driver started"
+ fi
+fi
- # 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.."