altosuilib: Control map debugging output with Serial.debug
authorKeith Packard <keithp@keithp.com>
Sat, 26 Mar 2016 22:57:59 +0000 (15:57 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 26 Mar 2016 23:07:20 +0000 (16:07 -0700)
This uses the same debug control as the serial output to monitor map downloading

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

index c1c3f8bb59d3076719e3e03fb9f435921e1c8683..4cc998585764991b74eec183a88987ea0e7dc1a8 100644 (file)
@@ -189,7 +189,8 @@ public class AltosUIMapPreloadNew extends AltosUIFrame implements ActionListener
        }
 
        public void debug(String format, Object ... arguments) {
-               System.out.printf(format, arguments);
+               if (AltosSerial.debug)
+                       System.out.printf(format, arguments);
        }