From: Keith Packard Date: Wed, 10 Aug 2011 21:34:39 +0000 (-0700) Subject: altosui: Prune telemetry file graphs to just the flight X-Git-Tag: 0.9.6.0~37 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=01b9352eb8ca0e4e2d023ce973c4e863cdcc0c51 altosui: Prune telemetry file graphs to just the flight Remove data earlier than 1 second before boost and data after landing. Signed-off-by: Keith Packard --- diff --git a/altosui/AltosDataPointReader.java b/altosui/AltosDataPointReader.java index fa48013f..c3aabb0c 100644 --- a/altosui/AltosDataPointReader.java +++ b/altosui/AltosDataPointReader.java @@ -69,10 +69,14 @@ class AltosDataPointReader implements Iterable { throw new UnsupportedOperationException(); } public boolean hasNext() { + if (record != null && record.state == Altos.ao_flight_landed) + return false; return iter.hasNext(); } public AltosDataPoint next() { - read_next_record(); + do { + read_next_record(); + } while (record.time < -1.0 && hasNext()); return current_dp(); } };