import java.io.*;
import java.util.concurrent.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.filechooser.FileNameExtensionFilter;
+import javax.swing.table.*;
+import javax.swing.event.*;
public class AltosIgnite {
AltosDevice device;
private void start_serial() throws InterruptedException {
serial_started = true;
- if (remote) {
- serial.set_radio();
- serial.printf("p\nE 0\n");
- serial.flush_input();
- }
+ if (remote)
+ serial.start_remote();
}
private void stop_serial() throws InterruptedException {
serial_started = false;
if (serial == null)
return;
- if (remote) {
- serial.printf("~");
- serial.flush_output();
- }
+ if (remote)
+ serial.stop_remote();
}
class string_ref {
return status;
}
- public String status_string(int status) {
+ public static String status_string(int status) {
switch (status) {
case Unknown: return "Unknown";
case Ready: return "Ready";
serial = null;
}
+ public void set_frame(Frame frame) {
+ serial.set_frame(frame);
+ }
+
public AltosIgnite(AltosDevice in_device) throws FileNotFoundException, AltosSerialInUseException {
device = in_device;