X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=telegps%2FTeleGPS.java;h=3646f000a450d2b65a8c1304520a7a84098f248c;hp=5e500e0259a74623e6d934d2e85b876bc0107d2a;hb=0da4e201041a4420f273c2e0cda77eea78099518;hpb=855a7d243a5a85728a7b23fdfe9485d4ecaf71cf diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java index 5e500e02..3646f000 100644 --- a/telegps/TeleGPS.java +++ b/telegps/TeleGPS.java @@ -25,8 +25,8 @@ import java.io.*; import java.util.concurrent.*; import java.util.*; import java.text.*; -import org.altusmetrum.altoslib_11.*; -import org.altusmetrum.altosuilib_11.*; +import org.altusmetrum.altoslib_12.*; +import org.altusmetrum.altosuilib_12.*; public class TeleGPS extends AltosUIFrame @@ -301,7 +301,7 @@ public class TeleGPS if (set == null) return; AltosFlightSeries series = make_series(set); - new AltosCSVUI(this, series, series.cal_data, chooser.file()); + new AltosCSVUI(this, series, chooser.file()); } void graph() { @@ -620,21 +620,10 @@ public class TeleGPS } static AltosRecordSet record_set(File file) { - FileInputStream 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 { - return new AltosEepromFile(new FileReader(file)); - } catch (Exception e) { - System.out.printf("Failed to open file '%s'\n", file); - } + try { + return AltosLib.record_set(file); + } catch (IOException ie) { + System.out.printf("%s\n", ie.getMessage()); } return null; }