altoslib: Remove older eeprom handling code
[fw/altos] / altosui / AltosLanded.java
index ded085376fa3fb8ff35c302eaa17ba5b2e93b735..25d4fcc80ea796ae88c63fabfdd426f90fef3e7d 100644 (file)
@@ -125,7 +125,7 @@ public class AltosLanded extends AltosUIFlightTab implements ActionListener {
                                try {
                                        AltosStateIterable states = null;
                                        if (filename.endsWith("eeprom")) {
-                                               FileInputStream in = new FileInputStream(file);
+                                               FileReader in = new FileReader(file);
                                                states = new AltosEepromFile(in);
                                        } else if (filename.endsWith("telem")) {
                                                FileInputStream in = new FileInputStream(file);
@@ -143,6 +143,11 @@ public class AltosLanded extends AltosUIFlightTab implements ActionListener {
                                                                      fe.getMessage(),
                                                                      "Cannot open file",
                                                                      JOptionPane.ERROR_MESSAGE);
+                               } catch (IOException ie) {
+                                       JOptionPane.showMessageDialog(null,
+                                                                     ie.getMessage(),
+                                                                     "Error reading file file",
+                                                                     JOptionPane.ERROR_MESSAGE);
                                }
                        }
                }