Adding delay on Linux before looking for Leonardo bootloader.

This commit is contained in:
David A. Mellis 2012-03-04 20:42:44 -05:00
parent eda8f1301f
commit 2cff5593ec
1 changed files with 6 additions and 0 deletions

View File

@ -98,6 +98,12 @@ public class AvrdudeUploader extends Uploader {
Serial.touchPort(uploadPort, 1200); Serial.touchPort(uploadPort, 1200);
} }
// 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) {