Skip to content

Commit 04f9cec

Browse files
committed
Fix for issue #209
1 parent c17ede5 commit 04f9cec

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

it.baeyens.arduino.core/src/it/baeyens/arduino/communication/ArduinoSerial.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static boolean reset_Arduino_by_baud_rate(String ComPort, int baudrate, l
3737
}
3838

3939
try {
40-
Thread.sleep(openTime);
40+
Thread.sleep(openTime); // FIXME this should NOT be done on MacOS
4141
} catch (InterruptedException e) {// Jaba is not going to write this
4242
// code
4343
}
@@ -61,8 +61,8 @@ public static String wait_for_com_Port_to_appear(MessageConsoleStream console, V
6161

6262
// wait for port to disappear
6363
int NumTries = 0;
64-
int MaxTries = 20; // wait for 2 seconds, leaves us 6secs in case we are not seeing disappearing ports but reset worked
65-
int delayMs = 100;
64+
int MaxTries = 20; // wait for max 5 seconds, leaves us 3 secs in case we are not seeing disappearing ports but reset worked
65+
int delayMs = 250;
6666
do {
6767

6868
NewPorts = Serial.list();
@@ -102,6 +102,7 @@ public static String wait_for_com_Port_to_appear(MessageConsoleStream console, V
102102
}
103103
} while (NewPortsCopy.size() == 0);
104104

105+
console.println("Comport reset took " + (NumTries * delayMs) + "ms");
105106
return NewPortsCopy.get(0);
106107
}
107108

@@ -178,7 +179,7 @@ public static String makeArduinoUploadready(MessageConsoleStream console, IProje
178179
console.println("Starting reset using 1200bps touch process");
179180
Vector<String> OriginalPorts = Serial.list();
180181

181-
if (!reset_Arduino_by_baud_rate(ComPort, 1200, 100) /* || */) {
182+
if (!reset_Arduino_by_baud_rate(ComPort, 1200, 300) /* || */) {
182183
console.println("reset using 1200bps touch failed");
183184

184185
} else {

0 commit comments

Comments
 (0)