mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Lowering upload timeout and per-iteration delay in Leonardo upload.
This commit is contained in:
@ -100,7 +100,7 @@ public class AvrdudeUploader extends Uploader {
|
|||||||
|
|
||||||
// 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 < 20000) {
|
while (elapsed < 10000) {
|
||||||
List<String> now = Serial.list();
|
List<String> now = Serial.list();
|
||||||
List<String> diff = new ArrayList<String>(now);
|
List<String> diff = new ArrayList<String>(now);
|
||||||
diff.removeAll(before);
|
diff.removeAll(before);
|
||||||
@ -122,8 +122,8 @@ public class AvrdudeUploader extends Uploader {
|
|||||||
|
|
||||||
// Keep track of port that disappears
|
// Keep track of port that disappears
|
||||||
before = now;
|
before = now;
|
||||||
Thread.sleep(500);
|
Thread.sleep(250);
|
||||||
elapsed += 500;
|
elapsed += 250;
|
||||||
|
|
||||||
// If after 5 seconds the selected port is active use that port
|
// If after 5 seconds the selected port is active use that port
|
||||||
if (elapsed == 5000 && now.contains(uploadPort)) {
|
if (elapsed == 5000 && now.contains(uploadPort)) {
|
||||||
|
Reference in New Issue
Block a user