X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosUI.java;h=538f87348639a00195323db2e5ce987a8b777ce9;hb=9fb15d397890c7e78bf3c1438f142f62bfc2bd35;hp=6993abab92ae2e49bb03cf621f537b56e50f065a;hpb=bdfcc9112c41c494de23594963980a730b625cc4;p=fw%2Faltos diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 6993abab..538f8734 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -27,6 +27,7 @@ import java.util.*; import java.text.*; import java.util.prefs.*; import java.util.concurrent.*; +import org.altusmetrum.AltosLib.*; import libaltosJNI.*; @@ -47,7 +48,7 @@ public class AltosUI extends AltosFrame { void telemetry_window(AltosDevice device) { try { - AltosFlightReader reader = new AltosTelemetryReader(device); + AltosFlightReader reader = new AltosTelemetryReader(new AltosSerial(device)); if (reader != null) new AltosFlightUI(voice, reader, device.getSerial()); } catch (FileNotFoundException ee) { @@ -108,7 +109,7 @@ public class AltosUI extends AltosFrame { if (imgURL != null) setIconImage(new ImageIcon(imgURL).getImage()); - AltosPreferences.set_component(this); + AltosUIPreferences.set_component(this); pane = getContentPane(); gridbag = new GridBagLayout(); @@ -262,9 +263,9 @@ public class AltosUI extends AltosFrame { String result; result = JOptionPane.showInputDialog(AltosUI.this, "Configure Callsign", - AltosPreferences.callsign()); + AltosUIPreferences.callsign()); if (result != null) - AltosPreferences.set_callsign(result); + AltosUIPreferences.set_callsign(result); } void ConfigureTeleMetrum() { @@ -365,6 +366,8 @@ public class AltosUI extends AltosFrame { in = new FileInputStream(file); if (filename.endsWith("eeprom")) return new AltosEepromIterable(in); + else if (filename.endsWith("mega")) + return new AltosEepromMegaIterable(in); else return new AltosTelemetryIterable(in); } catch (FileNotFoundException fe) { @@ -536,7 +539,7 @@ public class AltosUI extends AltosFrame { public static void main(final String[] args) { try { - UIManager.setLookAndFeel(AltosPreferences.look_and_feel()); + UIManager.setLookAndFeel(AltosUIPreferences.look_and_feel()); } catch (Exception e) { } /* Handle batch-mode */