From a7fc7901cd591c93d9d0cffeec2977ebb17554d4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 6 Apr 2010 00:55:19 -0700 Subject: [PATCH 1/1] TD reports "not-connected" when GPS has 0 sats --- ao-tools/altosui/AltosGPS.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ao-tools/altosui/AltosGPS.java b/ao-tools/altosui/AltosGPS.java index 92a17018..c3b368e2 100644 --- a/ao-tools/altosui/AltosGPS.java +++ b/ao-tools/altosui/AltosGPS.java @@ -108,7 +108,12 @@ public class AltosGPS { gps_time = new AltosGPSTime(); } AltosParse.word(words[i++], "SAT"); - int tracking_channels = AltosParse.parse_int(words[i++]); + int tracking_channels = 0; + if (words[i].equals("not-connected")) + tracking_channels = 0; + else + tracking_channels = AltosParse.parse_int(words[i]); + i++; cc_gps_sat = new AltosGPS.AltosGPSSat[tracking_channels]; for (int chan = 0; chan < tracking_channels; chan++) { cc_gps_sat[chan] = new AltosGPS.AltosGPSSat(); -- 2.30.2