From: Keith Packard Date: Thu, 19 Jul 2012 16:46:20 +0000 (-0700) Subject: altosui: Delay starting KML output for flight and GPS coords X-Git-Tag: 1.1~69 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=15ebd9c75aa57572040e3b1ee41e6f3eb8cf92ee altosui: Delay starting KML output for flight and GPS coords Don't start outputing KML data until the telem record containing flight number and GPS coordinates are present. Signed-off-by: Keith Packard --- diff --git a/altosui/AltosKML.java b/altosui/AltosKML.java index 2993607b..ff0734b8 100644 --- a/altosui/AltosKML.java +++ b/altosui/AltosKML.java @@ -133,6 +133,12 @@ public class AltosKML implements AltosWriter { if (gps == null) return; + if ((record.seen & (AltosRecord.seen_flight)) == 0) + return; + if ((record.seen & (AltosRecord.seen_gps_lat)) == 0) + return; + if ((record.seen & (AltosRecord.seen_gps_lon)) == 0) + return; if (!started) { start(record); started = true;