From 43f94e923a6a87520edcbb8fb4829e6ddf708908 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 14 May 2013 00:24:53 -0700 Subject: altoslib: Use sequence numbers to track GPS updates to AltosRecord State objects now record what GPS sequence ID they have to know when the GPS data has been updated. Record objects bump the GPS sequence each time new GPS data is recorded. This way, record objects aren't modified as they're iterated over to generate the list of state objects which makes it possible to iterate multiple times and get the same resulting set of states. Signed-off-by: Keith Packard --- altoslib/AltosTelemetryRecordLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'altoslib/AltosTelemetryRecordLocation.java') diff --git a/altoslib/AltosTelemetryRecordLocation.java b/altoslib/AltosTelemetryRecordLocation.java index 02999696..0236d291 100644 --- a/altoslib/AltosTelemetryRecordLocation.java +++ b/altoslib/AltosTelemetryRecordLocation.java @@ -85,7 +85,7 @@ public class AltosTelemetryRecordLocation extends AltosTelemetryRecordRaw { next.gps.hdop = hdop; next.gps.vdop = vdop; next.seen |= AltosRecord.seen_gps_time | AltosRecord.seen_gps_lat | AltosRecord.seen_gps_lon; - next.new_gps = true; + next.gps_sequence++; } return next; -- cgit v1.2.3