From 0564f9b13d4e3050b0a45fc1c4f710ab2b1f9d81 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 12 Sep 2012 22:40:57 -0700 Subject: altosui: Leave new_gps indication until gps value is used During replay, AltosState may not see a new GPS value as soon as it lands in the state field as additional records with the same timestamp may come in after the GPS record. Instead of resetting the new_gps indication when the new record is created, wait until the new_gps indication is seen by the AltosState update code and have that clear the new_gps indication. Signed-off-by: Keith Packard --- altoslib/AltosState.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'altoslib/AltosState.java') diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index 2806812e..2e4d8870 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -165,6 +165,8 @@ public class AltosState { } else pad_alt = ground_altitude; + data.new_gps = false; + gps_waiting = MIN_PAD_SAMPLES - npad; if (gps_waiting < 0) gps_waiting = 0; -- cgit v1.2.3