mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Increase wait for upload port timeout to 5s on all platforms
OS X 10.11 seems to be slower, increasing timeout to 5s on all platforms to keep things simple.
This commit is contained in:
parent
26e25a4d58
commit
de412656ec
@ -247,11 +247,10 @@ public class SerialUploader extends Uploader {
|
|||||||
Thread.sleep(250);
|
Thread.sleep(250);
|
||||||
elapsed += 250;
|
elapsed += 250;
|
||||||
|
|
||||||
// On Windows, it can take a long time for the port to disappear and
|
// On Windows and OS X, it can take a few seconds for the port to disappear and
|
||||||
// come back, so use a longer time out before assuming that the
|
// come back, so use a time out before assuming that the selected port is the
|
||||||
// selected
|
// bootloader (not the sketch).
|
||||||
// port is the bootloader (not the sketch).
|
if (elapsed >= 5000 && now.contains(uploadPort)) {
|
||||||
if (((!OSUtils.isWindows() && elapsed >= 500) || elapsed >= 5000) && now.contains(uploadPort)) {
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
System.out.println("Uploading using selected port: " + uploadPort);
|
System.out.println("Uploading using selected port: " + uploadPort);
|
||||||
return uploadPort;
|
return uploadPort;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user