summaryrefslogtreecommitdiff
path: root/altoslib/AltosState.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-09-12 22:40:57 -0700
committerKeith Packard <keithp@keithp.com>2012-09-12 23:54:13 -0700
commit0564f9b13d4e3050b0a45fc1c4f710ab2b1f9d81 (patch)
tree41662bf0bbeb13569f2829ea778a77796506befd /altoslib/AltosState.java
parent7e237920abb582d7ceb3e1925b11a848575ac68a (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosState.java')
-rw-r--r--altoslib/AltosState.java2
1 files changed, 2 insertions, 0 deletions
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;