summaryrefslogtreecommitdiff
path: root/telegps/TeleGPS.java
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2017-05-10 22:19:38 -0600
committerBdale Garbee <bdale@gag.com>2017-05-10 22:20:43 -0600
commit238e56e0f6ab2f623e0faf25298b38dc3a4aff74 (patch)
treeed4718beb5ef86564d768d5e5f7383208bcc7425 /telegps/TeleGPS.java
parent0641326842bffbf4b3ae69459ca540131cb64e59 (diff)
telegps: use new eeprom reading code
Diffstat (limited to 'telegps/TeleGPS.java')
-rw-r--r--telegps/TeleGPS.java27
1 files changed, 17 insertions, 10 deletions
diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java
index 66eaaa2b..cf2cbd4f 100644
--- a/telegps/TeleGPS.java
+++ b/telegps/TeleGPS.java
@@ -614,16 +614,23 @@ public class TeleGPS
static AltosStateIterable record_iterable(File file) {
FileInputStream in;
- try {
- in = new FileInputStream(file);
- } catch (Exception e) {
- System.out.printf("Failed to open file '%s'\n", file);
- return null;
- }
- if (file.getName().endsWith("telem"))
- return new AltosTelemetryFile(in);
- else
- return new AltosEepromFile(in);
+ if (file.getName().endsWith("telem")) {
+ try {
+ in = new FileInputStream(file);
+ return new AltosTelemetryFile(in);
+ } catch (Exception e) {
+ System.out.printf("Failed to open file '%s'\n", file);
+ }
+ } else {
+
+ try {
+ AltosEepromFile f = new AltosEepromFile(new FileReader(file));
+ return f;
+ } catch (Exception e) {
+ System.out.printf("Failed to open file '%s'\n", file);
+ }
+ }
+ return null;
}
static AltosReplayReader replay_file(File file) {