import java.util.*;
import java.text.*;
import java.util.prefs.*;
-import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.*;
import libaltosJNI.*;
device.toShortString(),
"Unkonwn I/O error",
JOptionPane.ERROR_MESSAGE);
+ } catch (TimeoutException te) {
+ JOptionPane.showMessageDialog(this,
+ device.toShortString(),
+ "Timeout error",
+ JOptionPane.ERROR_MESSAGE);
+ } catch (InterruptedException ie) {
+ JOptionPane.showMessageDialog(this,
+ device.toShortString(),
+ "Interrupted exception",
+ JOptionPane.ERROR_MESSAGE);
}
}
ExportData();
}
});
- b = addButton(0, 1, "Configure TeleMetrum");
+ b = addButton(0, 1, "Configure Altimeter");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ConfigureTeleMetrum();
}
});
+
+ b = addButton(0, 2, "Scan Channels");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ ScanChannels();
+ }
+ });
+
+ b = addButton(1, 2, "Load Maps");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ LoadMaps();
+ }
+ });
+
+ b = addButton(2, 2, "Monitor Idle");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ IdleMonitor();
+ }
+ });
+
setTitle("AltOS");
pane.doLayout();
new AltosIgniteUI(AltosUI.this);
}
+ void ScanChannels() {
+ new AltosScanUI(AltosUI.this);
+ }
+
+ void LoadMaps() {
+ new AltosSiteMapPreload(AltosUI.this);
+ }
+
/*
* Replay a flight from telemetry data
*/
AltosRecordIterable iterable = chooser.runDialog();
if (iterable != null) {
AltosFlightReader reader = new AltosReplayReader(iterable.iterator(),
- chooser.filename());
+ chooser.file());
new AltosFlightUI(voice, reader);
}
}
AltosRecordIterable record_reader = chooser.runDialog();
if (record_reader == null)
return;
- new AltosGraphUI(record_reader);
+ try {
+ new AltosGraphUI(record_reader);
+ } catch (InterruptedException ie) {
+ } catch (IOException ie) {
+ }
}
private void ConfigureAltosUI() {
new AltosConfigureUI(AltosUI.this, voice);
}
+ private void IdleMonitor() {
+ try {
+ new AltosIdleMonitorUI(this);
+ } catch (Exception e) {
+ }
+ }
+
static AltosRecordIterable open_logfile(String filename) {
File file = new File (filename);
try {
} else {
recs = new AltosTelemetryIterable(in);
}
- reader = new AltosReplayReader(recs.iterator(), filename);
+ reader = new AltosReplayReader(recs.iterator(), new File(filename));
AltosFlightUI flight_ui = new AltosFlightUI(new AltosVoice(), reader);
flight_ui.set_exit_on_close();
return;