X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosDataChooser.java;h=b003a606d02788d0e2e3d86ed4390c54cc6771ac;hb=1fc97dd9875a7639533a34438c4c7c999412eb3a;hp=d81ca6d1a128aa009c7420e0f9a67f96901ae4f4;hpb=f6f54d70b768dca1715ddddea64a4df00d82b09e;p=fw%2Faltos diff --git a/altosui/AltosDataChooser.java b/altosui/AltosDataChooser.java index d81ca6d1..b003a606 100644 --- a/altosui/AltosDataChooser.java +++ b/altosui/AltosDataChooser.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; @@ -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()); } }