@@ -37,7 +37,7 @@ public static boolean reset_Arduino_by_baud_rate(String ComPort, int baudrate, l
37
37
}
38
38
39
39
try {
40
- Thread .sleep (openTime );
40
+ Thread .sleep (openTime ); // FIXME this should NOT be done on MacOS
41
41
} catch (InterruptedException e ) {// Jaba is not going to write this
42
42
// code
43
43
}
@@ -61,8 +61,8 @@ public static String wait_for_com_Port_to_appear(MessageConsoleStream console, V
61
61
62
62
// wait for port to disappear
63
63
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 ;
66
66
do {
67
67
68
68
NewPorts = Serial .list ();
@@ -102,6 +102,7 @@ public static String wait_for_com_Port_to_appear(MessageConsoleStream console, V
102
102
}
103
103
} while (NewPortsCopy .size () == 0 );
104
104
105
+ console .println ("Comport reset took " + (NumTries * delayMs ) + "ms" );
105
106
return NewPortsCopy .get (0 );
106
107
}
107
108
@@ -178,7 +179,7 @@ public static String makeArduinoUploadready(MessageConsoleStream console, IProje
178
179
console .println ("Starting reset using 1200bps touch process" );
179
180
Vector <String > OriginalPorts = Serial .list ();
180
181
181
- if (!reset_Arduino_by_baud_rate (ComPort , 1200 , 100 ) /* || */ ) {
182
+ if (!reset_Arduino_by_baud_rate (ComPort , 1200 , 300 ) /* || */ ) {
182
183
console .println ("reset using 1200bps touch failed" );
183
184
184
185
} else {
0 commit comments