From db4cd8b3838d27bebdeb6a085a739a36f7634a91 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 14 Oct 2013 20:42:14 -0700 Subject: altoslib,altosui: Be more robust when graphing bogus .telem files Deal with files containing multiple serial number/flight number values by preserving the boost_tick value across state resets. Check for invalid state when computing actual boost time for the stats window. Ignore invalid speed/accel values when computing averages. Signed-off-by: Keith Packard --- altoslib/AltosTelemetryIterable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'altoslib/AltosTelemetryIterable.java') diff --git a/altoslib/AltosTelemetryIterable.java b/altoslib/AltosTelemetryIterable.java index 9da3b0e6..bf30b4c8 100644 --- a/altoslib/AltosTelemetryIterable.java +++ b/altoslib/AltosTelemetryIterable.java @@ -68,7 +68,7 @@ public class AltosTelemetryIterable implements Iterable { public void add (AltosTelemetry telem) { int t = telem.tick; if (!telems.isEmpty()) { - while (t < tick - 32767) + while (t < tick - 1000) t += 65536; } tick = t; -- cgit v1.2.3