summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-04-06 00:55:19 -0700
committerKeith Packard <keithp@keithp.com>2010-04-06 00:55:19 -0700
commita7fc7901cd591c93d9d0cffeec2977ebb17554d4 (patch)
tree12b4bec267716d6d3d44c601743bc01c0a7d6a0d
parente064d05da87926c19fb665b40fb280fb59328183 (diff)
TD reports "not-connected" when GPS has 0 sats
-rw-r--r--ao-tools/altosui/AltosGPS.java7
1 files changed, 6 insertions, 1 deletions
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();