altosui: Complete split out of separate java library
[fw/altos] / altosui / AltosDataChooser.java
index d81ca6d1a128aa009c7420e0f9a67f96901ae4f4..0d629b3c2cca994443e74507bcb413cb58b03b2a 100644 (file)
@@ -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();
                                }
@@ -74,6 +78,6 @@ public class AltosDataChooser extends JFileChooser {
                setDialogTitle("Select Flight Record File");
                setFileFilter(new FileNameExtensionFilter("Flight data file",
                                                          "telem", "eeprom"));
-               setCurrentDirectory(AltosPreferences.logdir());
+               setCurrentDirectory(AltosUIPreferences.logdir());
        }
 }