aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-07-16 16:43:11 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-07-16 16:43:11 +0200
commit39d88471896ac46c4aae475f7d6c73e44e7b5f25 (patch)
treef48db16a65c31be28f9fe5479cf8cef3a4b0439e /ROMFS
parentc8aca814ca4bff633dfd4a8341c08a2d4b8074fa (diff)
downloadpx4-firmware-39d88471896ac46c4aae475f7d6c73e44e7b5f25.tar.gz
px4-firmware-39d88471896ac46c4aae475f7d6c73e44e7b5f25.tar.bz2
px4-firmware-39d88471896ac46c4aae475f7d6c73e44e7b5f25.zip
sercon is only used by APM now
Diffstat (limited to 'ROMFS')
-rwxr-xr-xROMFS/px4fmu_common/init.d/rcS33
1 files changed, 17 insertions, 16 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index 22dec87cb..498c93f28 100755
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -42,30 +42,31 @@ then
sh /fs/microsd/etc/rc.txt
fi
-#
-# Check for USB host
-#
-if [ $USB != autoconnect ]
+# if this is an APM build then there will be a rc.APM script
+# from an EXTERNAL_SCRIPTS build option
+if [ -f /etc/init.d/rc.APM ]
then
- echo "[init] not connecting USB"
-else
- if sercon
+
+ #
+ # Check for USB host
+ #
+ if [ $USB != autoconnect ]
then
- echo "[init] USB interface connected"
+ echo "[init] not connecting USB"
else
- if [ -f /dev/ttyACM0 ]
- echo "[init] NSH via USB"
+ if sercon
then
+ echo "[init] USB interface connected"
else
- echo "[init] No USB connected"
+ if [ -f /dev/ttyACM0 ]
+ echo "[init] NSH via USB"
+ then
+ else
+ echo "[init] No USB connected"
+ fi
fi
fi
-fi
-# if this is an APM build then there will be a rc.APM script
-# from an EXTERNAL_SCRIPTS build option
-if [ -f /etc/init.d/rc.APM ]
-then
echo Running rc.APM
# if APM startup is successful then nsh will exit
sh /etc/init.d/rc.APM