diff options
author | Keith Packard <keithp@keithp.com> | 2011-06-28 01:03:00 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-06-28 01:03:00 -0700 |
commit | 7fd9b8f720add559b262e81d61ededc9df16ca94 (patch) | |
tree | ae32f830c27c99aacdfd6fb231e70a3ceee0f3ff /altosui/AltosGPS.java | |
parent | cb239b7161feea8646425b1f5788c3c82ae24321 (diff) |
altosui: Support raw telemetry from TeleDongle
Use raw telemetry frames when TeleDongle supports them, this involves
parsing the hex dump of the packet instead of having teledongle take
the packet apart. Only the legacy format is working at this point; the
altos bits for the new split telemetry frames is not written yet.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosGPS.java')
-rw-r--r-- | altosui/AltosGPS.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/altosui/AltosGPS.java b/altosui/AltosGPS.java index 0dbc8364..b5df7c9a 100644 --- a/altosui/AltosGPS.java +++ b/altosui/AltosGPS.java @@ -21,10 +21,6 @@ import java.lang.*; import java.text.*; public class AltosGPS { - public class AltosGPSSat { - int svid; - int c_n0; - } final static int MISSING = AltosRecord.MISSING; @@ -158,9 +154,9 @@ public class AltosGPS { else tracking_channels = AltosParse.parse_int(words[i]); i++; - cc_gps_sat = new AltosGPS.AltosGPSSat[tracking_channels]; + cc_gps_sat = new AltosGPSSat[tracking_channels]; for (int chan = 0; chan < tracking_channels; chan++) { - cc_gps_sat[chan] = new AltosGPS.AltosGPSSat(); + cc_gps_sat[chan] = new AltosGPSSat(); cc_gps_sat[chan].svid = AltosParse.parse_int(words[i++]); /* Older versions included SiRF status bits */ if (version < 2) @@ -168,7 +164,7 @@ public class AltosGPS { cc_gps_sat[chan].c_n0 = AltosParse.parse_int(words[i++]); } } else - cc_gps_sat = new AltosGPS.AltosGPSSat[0]; + cc_gps_sat = new AltosGPSSat[0]; } public void set_latitude(int in_lat) { @@ -201,14 +197,14 @@ public class AltosGPS { public void add_sat(int svid, int c_n0) { if (cc_gps_sat == null) { - cc_gps_sat = new AltosGPS.AltosGPSSat[1]; + cc_gps_sat = new AltosGPSSat[1]; } else { - AltosGPSSat[] new_gps_sat = new AltosGPS.AltosGPSSat[cc_gps_sat.length + 1]; + AltosGPSSat[] new_gps_sat = new AltosGPSSat[cc_gps_sat.length + 1]; for (int i = 0; i < cc_gps_sat.length; i++) new_gps_sat[i] = cc_gps_sat[i]; cc_gps_sat = new_gps_sat; } - AltosGPS.AltosGPSSat sat = new AltosGPS.AltosGPSSat(); + AltosGPSSat sat = new AltosGPSSat(); sat.svid = svid; sat.c_n0 = c_n0; cc_gps_sat[cc_gps_sat.length - 1] = sat; |