mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-31 20:52:13 +01:00
Refactor: simplified bool prefs retrieval
This commit is contained in:
parent
7adeef1ee3
commit
0a0d3c88e0
@ -124,11 +124,8 @@ public class SerialUploader extends Uploader {
|
||||
// this wait a moment for the bootloader to enumerate. On Windows, also must
|
||||
// deal with the fact that the COM port number changes from bootloader to
|
||||
// sketch.
|
||||
String t = prefs.get("upload.use_1200bps_touch");
|
||||
boolean doTouch = t != null && t.equals("true");
|
||||
|
||||
t = prefs.get("upload.wait_for_upload_port");
|
||||
boolean waitForUploadPort = (t != null) && t.equals("true");
|
||||
boolean doTouch = prefs.getBoolean("upload.use_1200bps_touch");
|
||||
boolean waitForUploadPort = prefs.getBoolean("upload.wait_for_upload_port");
|
||||
|
||||
String userSelectedUploadPort = prefs.getOrExcept("serial.port");
|
||||
String actualUploadPort = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user