Browse Source

Fixed NSH terminal init

sbg
Lorenz Meier 12 years ago
parent
commit
95260d4535
  1. 9
      ROMFS/px4fmu_common/init.d/rcS
  2. 2
      src/systemcmds/nshterm/nshterm.c

9
ROMFS/px4fmu_common/init.d/rcS

@ -61,11 +61,7 @@ then @@ -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 @@ -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

2
src/systemcmds/nshterm/nshterm.c

@ -62,7 +62,7 @@ nshterm_main(int argc, char *argv[]) @@ -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);

Loading…
Cancel
Save