summaryrefslogtreecommitdiff
path: root/altosui/AltosTelemetryRecordRaw.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-10-09 10:55:04 -0600
committerKeith Packard <keithp@keithp.com>2011-10-09 11:09:11 -0600
commit5c82b07471f017171c58a6968adf79901f46a987 (patch)
treee41009d4a56561a495d979dfbf6fd8c3f0a72e0c /altosui/AltosTelemetryRecordRaw.java
parent636b7b368e67346b0796cd84fbfd71e10966d61f (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosTelemetryRecordRaw.java')
-rw-r--r--altosui/AltosTelemetryRecordRaw.java6
1 files changed, 2 insertions, 4 deletions
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;