X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosDebug.java;h=3f469d48214dfc4ec9a999c425631ea55ba8d0b0;hp=ca2e5a9046625465130c0f4dd1ec55f9c10cba48;hb=ae02b1590439d5c8dfb472cf1f83a14fdcfbaf11;hpb=edcfb1bdf64772d3b83405ccf99385b8fea5d8e4 diff --git a/ao-tools/altosui/AltosDebug.java b/ao-tools/altosui/AltosDebug.java index ca2e5a90..3f469d48 100644 --- a/ao-tools/altosui/AltosDebug.java +++ b/ao-tools/altosui/AltosDebug.java @@ -62,8 +62,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 +103,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 +155,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;