X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosLanded.java;h=e13229a898150dd3fcca91fded2ab52316af6593;hb=c9cba68049f957d69a88150470c086dd6f4a42c0;hp=68efae8d85ba6e6c1342d404983e9ea057440f3a;hpb=97ab77d548964115e4b41ad5952194fcd1455c96;p=fw%2Faltos diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index 68efae8d..e13229a8 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -20,14 +20,8 @@ package altosui; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import javax.swing.filechooser.FileNameExtensionFilter; -import javax.swing.table.*; import java.io.*; -import java.util.*; -import java.text.*; -import java.util.prefs.*; -import java.util.concurrent.LinkedBlockingQueue; -import org.altusmetrum.AltosLib.*; +import org.altusmetrum.altoslib_1.*; public class AltosLanded extends JComponent implements AltosFlightDisplay, ActionListener { GridBagLayout layout; @@ -179,7 +173,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio class Speed extends LandedValue { void show (AltosState state, int crc_errors) { - show(AltosConvert.speed, state.max_speed); + show(AltosConvert.speed, state.max_speed()); } public Speed (GridBagLayout layout, int y) { super (layout, y, "Maximum Speed"); @@ -256,11 +250,14 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio } else if (filename.endsWith("telem")) { FileInputStream in = new FileInputStream(file); records = new AltosTelemetryIterable(in); + } else if (filename.endsWith("mega")) { + FileInputStream in = new FileInputStream(file); + records = new AltosEepromMegaIterable(in); } else { throw new FileNotFoundException(filename); } try { - new AltosGraphUI(records, filename); + new AltosGraphUI(records, file); } catch (InterruptedException ie) { } catch (IOException ie) { }