mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-21 12:29:23 +01:00
Also delaying after auto-reset on Windows.
Windows seemed to have the same issue as Linux: scanning for the ports prevented the reset from happening (i.e. it opened the port or otherwise raised DTR).
This commit is contained in:
parent
3a51c4c3ab
commit
d06710ebe5
@ -96,14 +96,14 @@ public class AvrdudeUploader extends Uploader {
|
||||
.println(_("Forcing reset using 1200bps open/close on port ")
|
||||
+ uploadPort);
|
||||
Serial.touchPort(uploadPort, 1200);
|
||||
|
||||
// Scanning for available ports seems to open the port or
|
||||
// otherwise assert DTR, which would cancel the WDT reset if
|
||||
// it happened within 250 ms. So we wait until the reset should
|
||||
// have already occured before we start scanning.
|
||||
if (!Base.isMacOS()) Thread.sleep(300);
|
||||
}
|
||||
|
||||
// On Linux, scanning for available ports seems to open the port
|
||||
// or otherwise assert DTR, which would cancel the WDT reset if
|
||||
// it happened within 250 ms. So we wait until the reset should
|
||||
// have already occured before we start scanning.
|
||||
if (Base.isLinux()) Thread.sleep(300);
|
||||
|
||||
// Wait for a port to appear on the list
|
||||
int elapsed = 0;
|
||||
while (elapsed < 10000) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user