X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosUI.java;h=7bb4ba12bd94b8a172ce1e41fa45fd5f43690ce6;hp=94c4dd2aa4b10bb2ae6424268344f0c9ace981f6;hb=2e7b7b80432bb251ac39efa1fa05d32b5f250e14;hpb=3fbefb3eea981d34a09496cf8abf0119de2e35bf diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 94c4dd2a..7bb4ba12 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -34,7 +34,7 @@ public class AltosUI extends JFrame { 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","")), @@ -99,7 +99,7 @@ public class AltosUI extends JFrame { if (imgURL != null) setIconImage(new ImageIcon(imgURL).getImage()); - AltosPreferences.init(this); + AltosPreferences.set_component(this); pane = getContentPane(); gridbag = new GridBagLayout(); @@ -199,7 +199,7 @@ public class AltosUI extends JFrame { private void ConnectToDevice() { AltosDevice device = AltosDeviceDialog.show(AltosUI.this, - AltosDevice.product_basestation); + Altos.product_basestation); if (device != null) telemetry_window(device); @@ -219,7 +219,7 @@ public class AltosUI extends JFrame { } void FlashImage() { - new AltosFlashUI(AltosUI.this); + AltosFlashUI.show(AltosUI.this); } void FireIgniter() { @@ -245,7 +245,7 @@ public class AltosUI extends JFrame { * 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 @@ -328,7 +328,7 @@ public class AltosUI extends JFrame { 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(); @@ -397,9 +397,9 @@ public class AltosUI extends JFrame { 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 devices = AltosUSBDevice.list(Altos.product_basestation); + for (AltosDevice device : devices) + altosui.telemetry_window(device); } } }