X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosGPS.java;h=f8eb5f4844150024244f3ef08211db8f75c62d9d;hb=8f2f38f2a9fb0c106e2c6b60cdc205292ce329ea;hp=92a17018a6775566269e4c1c1ccd26c02f61b098;hpb=9cc48698ec14c34d437baad7b6540edc31e9741c;p=fw%2Faltos diff --git a/ao-tools/altosui/AltosGPS.java b/ao-tools/altosui/AltosGPS.java index 92a17018..f8eb5f48 100644 --- a/ao-tools/altosui/AltosGPS.java +++ b/ao-tools/altosui/AltosGPS.java @@ -90,6 +90,9 @@ public class AltosGPS { gps_connected = true; gps_time = new AltosGPSTime(); i++; + } else if ((words[i]).equals("not-connected")) { + gps_time = new AltosGPSTime(); + i++; } else if (words.length >= 40) { gps_locked = true; gps_connected = true; @@ -106,9 +109,15 @@ public class AltosGPS { v_error = AltosParse.parse_int(AltosParse.strip_suffix(words[i++], "(verr)")); } else { gps_time = new AltosGPSTime(); + i++; } 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();