projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e064d05
)
TD reports "not-connected" when GPS has 0 sats
author
Keith Packard
<keithp@keithp.com>
Tue, 6 Apr 2010 07:55:19 +0000
(
00:55
-0700)
committer
Keith Packard
<keithp@keithp.com>
Tue, 6 Apr 2010 07:55:19 +0000
(
00:55
-0700)
ao-tools/altosui/AltosGPS.java
patch
|
blob
|
history
diff --git
a/ao-tools/altosui/AltosGPS.java
b/ao-tools/altosui/AltosGPS.java
index 92a17018a6775566269e4c1c1ccd26c02f61b098..c3b368e26b47ce022f5e34068bf227e49d3bb7e1 100644
(file)
--- 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();