From 7894c27b2b2c3c46a7c107c8acd5977830f006cf Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 21 Oct 2012 16:13:14 -0700 Subject: altoslib: Move computed state from AltosRecord to AltosState Make AltosRecord simply track the raw data and have AltosState hold all computed values, including cross-packet averages and computed speeds. Signed-off-by: Keith Packard --- altosui/AltosLanded.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'altosui/AltosLanded.java') diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index 57c2d476..0111a08a 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -173,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"); -- cgit v1.2.3 From f789b0b94eb01e3875f7711ce053658c31e75fad Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 21 Oct 2012 17:00:08 -0700 Subject: altosui: Handle .mega files in Landed tab 'Graph Flight' button Need to check for .mega files here too. Signed-off-by: Keith Packard --- altosui/AltosLanded.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'altosui/AltosLanded.java') diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index 0111a08a..5e073f7d 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -250,6 +250,9 @@ 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); } -- cgit v1.2.3