From: Keith Packard Date: Tue, 6 Apr 2010 07:55:19 +0000 (-0700) Subject: TD reports "not-connected" when GPS has 0 sats X-Git-Tag: debian/0.6+163+g01e524f~8 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=a7fc7901cd591c93d9d0cffeec2977ebb17554d4;hp=e064d05da87926c19fb665b40fb280fb59328183;ds=inline TD reports "not-connected" when GPS has 0 sats --- 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();