altosui: flush serial output before waiting for reply
authorKeith Packard <keithp@keithp.com>
Tue, 24 Aug 2010 05:01:11 +0000 (22:01 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 24 Aug 2010 05:01:11 +0000 (22:01 -0700)
ao-tools/altosui/AltosSerial.java

index a62f122..d02e25a 100644 (file)
@@ -84,7 +84,9 @@ public class AltosSerial implements Runnable {
        }
 
        public String get_reply() throws InterruptedException {
-               return reply_queue.take();
+               libaltos.altos_flush(altos);
+               String line = reply_queue.take();
+               return line;
        }
 
        public void add_monitor(LinkedBlockingQueue<String> q) {