mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 10:07:36 +08:00
Fixed NSH terminal init
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user