From 15ebd9c75aa57572040e3b1ee41e6f3eb8cf92ee Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 19 Jul 2012 09:46:20 -0700 Subject: [PATCH] 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 --- altosui/AltosKML.java | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.30.2