From 0669f0d74fc24c4f1925a45a9975b7a49a65b692 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 27 Oct 2011 00:49:23 -0700 Subject: altosui: Only update GPS data when new GPS information arrives Track which telemetry packets are actually producing new GPS information and only update the GPS average position and count of stable GPS reports with new GPS info, instead of on every telemetry packet. Signed-off-by: Keith Packard --- altosui/AltosEepromIterable.java | 1 + 1 file changed, 1 insertion(+) (limited to 'altosui/AltosEepromIterable.java') diff --git a/altosui/AltosEepromIterable.java b/altosui/AltosEepromIterable.java index 812e5fc6..d8205816 100644 --- a/altosui/AltosEepromIterable.java +++ b/altosui/AltosEepromIterable.java @@ -177,6 +177,7 @@ public class AltosEepromIterable extends AltosRecordIterable { state.gps.locked = (flags & Altos.AO_GPS_VALID) != 0; state.gps.nsat = (flags & Altos.AO_GPS_NUM_SAT_MASK) >> Altos.AO_GPS_NUM_SAT_SHIFT; + state.new_gps = true; has_gps = true; break; case Altos.AO_LOG_GPS_LAT: -- cgit v1.2.3