altosuilib: Only display map debugging when serial_debug is enabled
authorKeith Packard <keithp@keithp.com>
Sun, 5 Jun 2016 16:17:12 +0000 (09:17 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 5 Jun 2016 16:17:12 +0000 (09:17 -0700)
This keeps the application quiet for most users.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosuilib/AltosUIMap.java

index 364540542c7488c6db120fb13a9570997e2dae2c..8c90bcd8d8a86ddd7549da7b90ec93ab669e9aaa 100644 (file)
@@ -361,7 +361,8 @@ public class AltosUIMap extends JComponent implements AltosFlightDisplay, AltosM
        }
 
        public void debug(String format, Object ... arguments) {
-               System.out.printf(format, arguments);
+               if (AltosUIPreferences.serial_debug())
+                       System.out.printf(format, arguments);
        }