diff options
| author | Keith Packard <keithp@keithp.com> | 2010-07-28 13:01:52 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-07-28 13:01:52 -0700 |
| commit | 71da54a5ce255395376a44586782ab8b6f3b289f (patch) | |
| tree | b6dc77d08e3c1dace620249f60e69b7ed0c70b5c /ao-tools/altosui/AltosSerial.java | |
| parent | e76b9cc32bbcc5176d9bdd6f8d79778024627382 (diff) | |
Make voice and channel menus work.
Stores voice and channel data to preferences.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosSerial.java')
| -rw-r--r-- | ao-tools/altosui/AltosSerial.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ao-tools/altosui/AltosSerial.java b/ao-tools/altosui/AltosSerial.java index b016c1d6..f12b31b3 100644 --- a/ao-tools/altosui/AltosSerial.java +++ b/ao-tools/altosui/AltosSerial.java @@ -119,7 +119,8 @@ public class AltosSerial implements Runnable { } public void putc(char c) { - libaltos.altos_putchar(altos, c); + if (altos != null) + libaltos.altos_putchar(altos, c); } public void print(String data) { @@ -138,6 +139,17 @@ public class AltosSerial implements Runnable { throw new FileNotFoundException(device.getPath()); input_thread = new Thread(this); input_thread.start(); + print("\nE 0\nm 1\n"); + try { + Thread.sleep(200); + } catch (InterruptedException e) { + } + flush(); + } + + public void set_channel(int channel) { + if (altos != null) + printf("m 0\nc r %d\nm 1\n", channel); } public AltosSerial() { |
