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 a62f122550fd5240bb57e4feac2b46a7eb200e5c..d02e25a965e7a9344b9ac0f6ab45b084a7953b40 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) {