public AltosVoice voice = new AltosVoice();
public static boolean load_library(Frame frame) {
- if (!AltosDevice.load_library()) {
+ if (!Altos.load_library()) {
JOptionPane.showMessageDialog(frame,
String.format("No AltOS library in \"%s\"",
System.getProperty("java.library.path","<undefined>")),
if (imgURL != null)
setIconImage(new ImageIcon(imgURL).getImage());
- AltosPreferences.init(this);
+ AltosPreferences.set_component(this);
pane = getContentPane();
gridbag = new GridBagLayout();
}
});
+
+ 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();
private void ConnectToDevice() {
AltosDevice device = AltosDeviceDialog.show(AltosUI.this,
- AltosDevice.product_basestation);
+ Altos.product_basestation);
if (device != null)
telemetry_window(device);
}
void FlashImage() {
- new AltosFlashUI(AltosUI.this);
+ AltosFlashUI.show(AltosUI.this);
}
void FireIgniter() {
new AltosIgniteUI(AltosUI.this);
}
+ void ScanChannels() {
+ new AltosScanUI(AltosUI.this);
+ }
+
+ void LoadMaps() {
+ new AltosSiteMapPreload(AltosUI.this);
+ }
+
/*
* Replay a flight from telemetry data
*/
* a TeleDongle over the packet link
*/
private void SaveFlightData() {
- new AltosEepromDownload(AltosUI.this);
+ new AltosEepromManage(AltosUI.this);
}
/* Load a flight log file and write out a CSV file containing
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 {
if (input.equals(output)) {
System.out.printf("Not processing '%s'\n", input);
} else {
- AltosWriter writer = open_csv(output);
+ AltosWriter writer = open_csv("/dev/stdout");
if (writer != null) {
writer.write(iterable);
writer.close();
AltosUI altosui = new AltosUI();
altosui.setVisible(true);
- AltosDevice[] devices = AltosDevice.list(AltosDevice.product_basestation);
- for (int i = 0; i < devices.length; i++)
- altosui.telemetry_window(devices[i]);
+ java.util.List<AltosDevice> devices = AltosUSBDevice.list(Altos.product_basestation);
+ for (AltosDevice device : devices)
+ altosui.telemetry_window(device);
}
}
}