1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03: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:
David A. Mellis
2012-03-06 16:33:29 -05:00
parent 3a51c4c3ab
commit d06710ebe5

View File

@ -96,13 +96,13 @@ public class AvrdudeUploader extends Uploader {
.println(_("Forcing reset using 1200bps open/close on port ") .println(_("Forcing reset using 1200bps open/close on port ")
+ uploadPort); + uploadPort);
Serial.touchPort(uploadPort, 1200); Serial.touchPort(uploadPort, 1200);
}
// On Linux, scanning for available ports seems to open the port // Scanning for available ports seems to open the port or
// or otherwise assert DTR, which would cancel the WDT reset if // otherwise assert DTR, which would cancel the WDT reset if
// 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.
if (Base.isLinux()) Thread.sleep(300); if (!Base.isMacOS()) Thread.sleep(300);
}
// Wait for a port to appear on the list // Wait for a port to appear on the list
int elapsed = 0; int elapsed = 0;