altosui: Eliminate unncessary import altosui lines
[fw/altos] / ao-tools / altosui / AltosDebug.java
index ca2e5a9046625465130c0f4dd1ec55f9c10cba48..9c10129ddbf2aeb4ece08dc9af3a5f47f4d375b7 100644 (file)
@@ -22,8 +22,6 @@ import java.io.*;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.LinkedList;
 import java.util.Iterator;
-import altosui.AltosSerial;
-import altosui.AltosRomconfig;
 
 public class AltosDebug extends AltosSerial {
 
@@ -62,8 +60,8 @@ public class AltosDebug extends AltosSerial {
 
        void ensure_debug_mode() {
                if (!debug_mode) {
-                       printf("m 0\nD\n");
-                       flush_reply();
+                       printf("D\n");
+                       flush_input();
                        debug_mode = true;
                }
        }
@@ -103,7 +101,7 @@ public class AltosDebug extends AltosSerial {
                throws IOException, InterruptedException {
                byte[]  data = new byte[length];
 
-               flush_reply();
+               flush_input();
                ensure_debug_mode();
                printf("I %x %x\n", length, address);
                int i = 0;
@@ -155,7 +153,7 @@ public class AltosDebug extends AltosSerial {
        public byte[] read_bytes(int length)
                throws IOException, InterruptedException {
 
-               flush_reply();
+               flush_input();
                ensure_debug_mode();
                printf("G %x\n", length);
                int i = 0;