X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosUI.java;h=7caaa3e9a5107f067b02dc5584b42ab174de8072;hp=b0c6d33b843f7630be9b8364b3f787a56a6a1497;hb=bbe0c2e0a3216f40f49af34b756330ba28d7c7e1;hpb=e311cefae19d7dc71fb10e9a943daa8e2313c8f8 diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index b0c6d33b..7caaa3e9 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -348,7 +348,7 @@ public class AltosUI extends AltosUIFrame { if (states == null) return; try { - new AltosGraphUI(states, chooser.file()); + new AltosGraphUI(states, new AltosEepromRecordSet(new FileReader(chooser.file())), chooser.file()); } catch (InterruptedException ie) { } catch (IOException ie) { } @@ -367,16 +367,16 @@ public class AltosUI extends AltosUIFrame { static AltosStateIterable open_logfile(File file) { try { - FileInputStream in; - - in = new FileInputStream(file); if (file.getName().endsWith("telem")) - return new AltosTelemetryFile(in); + return new AltosTelemetryFile(new FileInputStream(file)); else - return new AltosEepromFile(in); + return new AltosEepromFile(new FileReader(file)); } catch (FileNotFoundException fe) { System.out.printf("%s\n", fe.getMessage()); return null; + } catch (IOException ie) { + System.out.printf("%s\n", ie.getMessage()); + return null; } } @@ -487,7 +487,7 @@ public class AltosUI extends AltosUIFrame { if (states == null) return false; try { - new AltosGraphUI(states, file); + new AltosGraphUI(states, new AltosEepromRecordSet(new FileReader(file)), file); return true; } catch (InterruptedException ie) { } catch (IOException ie) {