From 5c82b07471f017171c58a6968adf79901f46a987 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 9 Oct 2011 10:55:04 -0600 Subject: altosui: Deal with telem data that goes backwards in time The new telemetry stuff can send packets with older timestamps, so sort telem packets read from disk to create an in-order record of the flight. Signed-off-by: Keith Packard --- altosui/AltosTelemetryRecordRaw.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'altosui/AltosTelemetryRecordRaw.java') diff --git a/altosui/AltosTelemetryRecordRaw.java b/altosui/AltosTelemetryRecordRaw.java index 39b2ba07..fb2b495c 100644 --- a/altosui/AltosTelemetryRecordRaw.java +++ b/altosui/AltosTelemetryRecordRaw.java @@ -143,11 +143,9 @@ public class AltosTelemetryRecordRaw implements AltosTelemetryRecord { public AltosRecord update_state(AltosRecord previous) { AltosRecord next; - if (previous != null) { + if (previous != null) next = new AltosRecord(previous); - while (tick < previous.tick) - tick += 65536; - } else + else next = new AltosRecord(); next.serial = serial; next.tick = tick; -- cgit v1.2.3