altosui: Reading serial from swing thread only bad if remote
authorKeith Packard <keithp@keithp.com>
Tue, 9 Aug 2011 03:38:14 +0000 (20:38 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 9 Aug 2011 03:38:14 +0000 (20:38 -0700)
Make the warning on this condition based on whether the link is remote.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosSerial.java

index 5d4510b46679ff89cdf138ee47fc0f0e21426321..5e496d7f3d8070181018d48edc09c50255fc0a38 100644 (file)
@@ -217,7 +217,8 @@ public class AltosSerial implements Runnable {
 
                if (SwingUtilities.isEventDispatchThread()) {
                        can_cancel = false;
-                       System.out.printf("Uh-oh, reading serial device from swing thread\n");
+                       if (remote)
+                               System.out.printf("Uh-oh, reading remote serial device from swing thread\n");
                }
                flush_output();
                if (remote && can_cancel) {