From d06710ebe5cbc3b132d9d5f3a4babf45ce84d78c Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Tue, 6 Mar 2012 16:33:29 -0500 Subject: [PATCH] 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). --- app/src/processing/app/debug/AvrdudeUploader.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/processing/app/debug/AvrdudeUploader.java b/app/src/processing/app/debug/AvrdudeUploader.java index 5b9eef572..9e0cfb43c 100755 --- a/app/src/processing/app/debug/AvrdudeUploader.java +++ b/app/src/processing/app/debug/AvrdudeUploader.java @@ -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) {