X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosDataChooser.java;h=0d629b3c2cca994443e74507bcb413cb58b03b2a;hb=55747ce210d7d80d5b4fdaaf9dc7ee0f7bc8b0a3;hp=15de05c2bb510723dabbe22704cbc41d55e57dad;hpb=51c7741040d95c5deece939dae5e4136cc04afc4;p=fw%2Faltos diff --git a/altosui/AltosDataChooser.java b/altosui/AltosDataChooser.java index 15de05c2..0d629b3c 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,12 +57,15 @@ 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(); } } catch (FileNotFoundException fe) { JOptionPane.showMessageDialog(frame, - filename, + fe.getMessage(), "Cannot open file", JOptionPane.ERROR_MESSAGE); } @@ -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()); } }