@@ -173,33 +173,33 @@ public static String makeArduinoUploadready(MessageConsoleStream console, IProje
173
173
.equalsIgnoreCase ("true" );
174
174
String boardName = Common .getBuildEnvironmentVariable (project , configName , ArduinoConst .ENV_KEY_JANTJE_BOARD_NAME , "" );
175
175
176
- if (use_1200bps_touch /*
177
- * || boardName.equalsIgnoreCase("Arduino leonardo") || boardName.equalsIgnoreCase("Arduino Micro") ||
178
- * boardName.equalsIgnoreCase("Arduino Esplora") || boardName.startsWith("Arduino Due")
179
- */ ) {
176
+ if (use_1200bps_touch ) {
180
177
// Get the list of the current com serial ports
181
178
console .println ("Starting reset using 1200bps touch process" );
182
179
Vector <String > OriginalPorts = Serial .list ();
183
180
184
- if (!reset_Arduino_by_baud_rate (ComPort , 1200 , 100 ) || boardName . startsWith ( "Arduino Due" ) || boardName . startsWith ( "Digistump DigiX" ) ) {
181
+ if (!reset_Arduino_by_baud_rate (ComPort , 1200 , 100 ) /* || */ ) {
185
182
console .println ("reset using 1200bps touch failed" );
186
- // Give the DUE/DigiX Atmel SAM-BA bootloader time to switch-in after the reset
187
- try {
188
- Thread .sleep (2000 );
189
- } catch (InterruptedException ex ) {
190
- // ignore error
183
+
184
+ } else {
185
+ if (boardName .startsWith ("Digistump DigiX" )) {
186
+ // Give the DUE/DigiX Atmel SAM-BA bootloader time to switch-in after the reset
187
+ try {
188
+ Thread .sleep (2000 );
189
+ } catch (InterruptedException ex ) {
190
+ // ignore error
191
+ }
192
+ }
193
+ if (bwait_for_upload_port ) {
194
+ String NewComport = wait_for_com_Port_to_appear (console , OriginalPorts , ComPort );
195
+ console .println ("Using comport " + NewComport + " from now onwards" );
196
+ console .println ("Ending reset using 1200bps touch process" );
197
+ return NewComport ;
191
198
}
192
- console .println ("Continuing to use " + ComPort );
193
- console .println ("Ending reset using 1200bps touch process" );
194
- return ComPort ;
195
- }
196
- if (boardName .equalsIgnoreCase ("Arduino leonardo" ) || boardName .equalsIgnoreCase ("Arduino Micro" )
197
- || boardName .equalsIgnoreCase ("Arduino Esplora" ) || bwait_for_upload_port ) {
198
- String NewComport = wait_for_com_Port_to_appear (console , OriginalPorts , ComPort );
199
- console .println ("Using comport " + NewComport + " from now onwards" );
200
- console .println ("Ending reset using 1200bps touch process" );
201
- return NewComport ;
202
199
}
200
+ console .println ("Continuing to use " + ComPort );
201
+ console .println ("Ending reset using 1200bps touch process" );
202
+ return ComPort ;
203
203
}
204
204
205
205
// connect to the serial port
0 commit comments