Skip to content

Commit 8e176b0

Browse files
committed
selectively suppress unwanted avrdude output for Leonardo when not verbose uploading is disabled
1 parent e90cb36 commit 8e176b0

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,6 @@ public boolean avrdude(Collection params) throws RunnerException {
286286
commandDownloader.add("-v");
287287
commandDownloader.add("-v");
288288
commandDownloader.add("-v");
289-
} else if (Base.getBoardPreferences().get("bootloader.path").equals("caterina")) {
290-
/* avrdude draws the line between verbose and quiet differently
291-
* uploads using AVR109 protocol. Compensate by being a little less
292-
* quiet about the results for these uploads */
293-
commandDownloader.add("-q");
294289
} else {
295290
commandDownloader.add("-q");
296291
commandDownloader.add("-q");

app/src/processing/app/debug/Uploader.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,17 @@ protected boolean executeUploadCommand(Collection commandDownloader)
184184
boolean notFoundError;
185185

186186
public void message(String s) {
187-
//System.err.println("MSG: " + s);
187+
// selectively suppress a bunch of avrdude output for AVR109/Caterina that should already be quelled but isn't
188+
if (!Preferences.getBoolean("upload.verbose") && (
189+
s.indexOf("Connecting to programmer:") != -1 ||
190+
s.indexOf("Found programmer: Id = \"CATERIN\"; type = S") != -1 ||
191+
s.indexOf("Software Version = 1.0; No Hardware Version given.") != -1 ||
192+
s.indexOf("Programmer supports auto addr increment.") != -1 ||
193+
s.indexOf("Programmer supports buffered memory access with buffersize=128 bytes.") != -1 ||
194+
s.indexOf("Programmer supports the following devices:") != -1 ||
195+
s.indexOf("Device code: 0x44") != -1))
196+
s = "";
197+
188198
System.err.print(s);
189199

190200
// ignore cautions

0 commit comments

Comments
 (0)