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) {
}
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;
}
}
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) {