mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-31 20:52:13 +01:00
Apply extra 250ms after waitForUploadPort to all platforms
This commit is contained in:
parent
7a535d9c40
commit
7cb1399381
@ -136,12 +136,11 @@ public class SerialUploader extends Uploader {
|
|||||||
// it happened within 250 ms. So we wait until the reset should
|
// it happened within 250 ms. So we wait until the reset should
|
||||||
// have already occured before we start scanning.
|
// have already occured before we start scanning.
|
||||||
actualUploadPort = waitForUploadPort(userSelectedUploadPort, before);
|
actualUploadPort = waitForUploadPort(userSelectedUploadPort, before);
|
||||||
|
|
||||||
if (OSUtils.isMacOS()) {
|
// on OS X, if the port is opened too quickly after it is detected,
|
||||||
// on OS X, if the port is opened too quickly after it is detected,
|
// a "Resource busy" error occurs, add a delay to workaround this,
|
||||||
// a "Resource busy" error occurs, add a delay to workaround this
|
// apply to other platforms as well.
|
||||||
Thread.sleep(250);
|
Thread.sleep(250);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (SerialException e) {
|
} catch (SerialException e) {
|
||||||
throw new RunnerException(e);
|
throw new RunnerException(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user