aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xROMFS/px4fmu_common/init.d/rcS9
-rw-r--r--src/systemcmds/nshterm/nshterm.c2
2 files changed, 5 insertions, 6 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index bb78b6a65..7f0409519 100755
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -61,11 +61,7 @@ then
#
# Start terminal
#
-if sercon
-then
- echo "USB connected"
- nshterm /dev/ttyACM0 &
-fi
+sercon
#
# Start the ORB (first app to start)
@@ -164,5 +160,8 @@ then
sh /etc/init.d/31_io_phantom
fi
+# Try to get an USB console
+nshterm /dev/ttyACM0 &
+
# End of autostart
fi
diff --git a/src/systemcmds/nshterm/nshterm.c b/src/systemcmds/nshterm/nshterm.c
index 41d108ffc..458bb2259 100644
--- a/src/systemcmds/nshterm/nshterm.c
+++ b/src/systemcmds/nshterm/nshterm.c
@@ -62,7 +62,7 @@ nshterm_main(int argc, char *argv[])
}
uint8_t retries = 0;
int fd = -1;
- while (retries < 5) {
+ while (retries < 50) {
/* the retries are to cope with the behaviour of /dev/ttyACM0 */
/* which may not be ready immediately. */
fd = open(argv[1], O_RDWR);