Skip to content

Commit c974e67

Browse files
committed
Query the preferences just once for the serial port
1 parent 9eda4a1 commit c974e67

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/processing/app/debug/AvrdudeUploader.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ private boolean uploadViaBootloader(String buildPath, String className)
7575
// avrdude wants "stk500v1" to distinguish it from stk500v2
7676
if (protocol.equals("stk500"))
7777
protocol = "stk500v1";
78+
String uploadPort = Preferences.get("serial.port");
7879
commandDownloader.add("-c" + protocol);
79-
commandDownloader.add(
80-
"-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port"));
80+
commandDownloader.add("-P" + (Base.isWindows() ? "\\\\.\\" : "")
81+
+ uploadPort);
8182
commandDownloader.add(
8283
"-b" + Integer.parseInt(boardPreferences.get("upload.speed")));
8384
commandDownloader.add("-D"); // don't erase

0 commit comments

Comments
 (0)