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:
@ -96,14 +96,14 @@ 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);
|
||||||
|
|
||||||
|
// 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
|
// Wait for a port to appear on the list
|
||||||
int elapsed = 0;
|
int elapsed = 0;
|
||||||
while (elapsed < 10000) {
|
while (elapsed < 10000) {
|
||||||
|
Reference in New Issue
Block a user