X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosDataChooser.java;h=4bd51c3938e61635bfb6ef49c6466c50304e7b8a;hp=d81ca6d1a128aa009c7420e0f9a67f96901ae4f4;hb=675ccd41e3b668cd4e1d2dd282dd317a00d00151;hpb=128bbfa150f88c09f7adde2434b7bf0b5a9ed556 diff --git a/altosui/AltosDataChooser.java b/altosui/AltosDataChooser.java index d81ca6d1..4bd51c39 100644 --- a/altosui/AltosDataChooser.java +++ b/altosui/AltosDataChooser.java @@ -26,6 +26,7 @@ import java.io.*; import java.util.*; import java.text.*; import java.util.prefs.*; +import org.altusmetrum.AltosLib.*; public class AltosDataChooser extends JFileChooser { JFrame frame; @@ -56,6 +57,9 @@ public class AltosDataChooser extends JFileChooser { } else if (filename.endsWith("telem")) { FileInputStream in = new FileInputStream(file); return new AltosTelemetryIterable(in); + } else if (filename.endsWith("mega")) { + FileInputStream in = new FileInputStream(file); + return new AltosEepromMegaIterable(in); } else { throw new FileNotFoundException(); } @@ -73,7 +77,7 @@ public class AltosDataChooser extends JFileChooser { frame = in_frame; setDialogTitle("Select Flight Record File"); setFileFilter(new FileNameExtensionFilter("Flight data file", - "telem", "eeprom")); - setCurrentDirectory(AltosPreferences.logdir()); + "telem", "eeprom", "mega")); + setCurrentDirectory(AltosUIPreferences.logdir()); } }