mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 06:43:34 +08:00
Check 30 seconds for USB port
This commit is contained in:
@@ -62,7 +62,9 @@ nshterm_main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
uint8_t retries = 0;
|
uint8_t retries = 0;
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
while (retries < 50) {
|
|
||||||
|
/* try the first 30 seconds */
|
||||||
|
while (retries < 300) {
|
||||||
/* the retries are to cope with the behaviour of /dev/ttyACM0 */
|
/* the retries are to cope with the behaviour of /dev/ttyACM0 */
|
||||||
/* which may not be ready immediately. */
|
/* which may not be ready immediately. */
|
||||||
fd = open(argv[1], O_RDWR);
|
fd = open(argv[1], O_RDWR);
|
||||||
|
|||||||
Reference in New Issue
Block a user