1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-13 10:29:35 +01:00

selectively suppress unwanted avrdude output for Leonardo when not verbose uploading is disabled

This commit is contained in:
Zach Eveland 2012-03-30 22:24:40 -04:00
parent e90cb3650d
commit 8e176b0084
2 changed files with 11 additions and 6 deletions

View File

@ -286,11 +286,6 @@ public class AvrdudeUploader extends Uploader {
commandDownloader.add("-v");
commandDownloader.add("-v");
commandDownloader.add("-v");
} else if (Base.getBoardPreferences().get("bootloader.path").equals("caterina")) {
/* avrdude draws the line between verbose and quiet differently
* uploads using AVR109 protocol. Compensate by being a little less
* quiet about the results for these uploads */
commandDownloader.add("-q");
} else {
commandDownloader.add("-q");
commandDownloader.add("-q");

View File

@ -184,7 +184,17 @@ public abstract class Uploader implements MessageConsumer {
boolean notFoundError;
public void message(String s) {
//System.err.println("MSG: " + s);
// selectively suppress a bunch of avrdude output for AVR109/Caterina that should already be quelled but isn't
if (!Preferences.getBoolean("upload.verbose") && (
s.indexOf("Connecting to programmer:") != -1 ||
s.indexOf("Found programmer: Id = \"CATERIN\"; type = S") != -1 ||
s.indexOf("Software Version = 1.0; No Hardware Version given.") != -1 ||
s.indexOf("Programmer supports auto addr increment.") != -1 ||
s.indexOf("Programmer supports buffered memory access with buffersize=128 bytes.") != -1 ||
s.indexOf("Programmer supports the following devices:") != -1 ||
s.indexOf("Device code: 0x44") != -1))
s = "";
System.err.print(s);
// ignore cautions