diff options
author | Keith Packard <keithp@keithp.com> | 2011-07-04 23:39:21 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-07-04 23:39:21 -0700 |
commit | ef3ce687d73c1274ce5368432f4d449b063ce5c0 (patch) | |
tree | 5b5688d72cc3256bd75dd0db813aa4b8dee87bef /src/ao_gps_test.c | |
parent | 359681f23e2f71bc8f4975a4a76ae28c08ecab2e (diff) |
altos: Complete new telemetry switchover
This involved rewriting the GPS code to use the telemetry structures
directly so that a memcpy could be used to transfer the data to the
telemetry packets, saving a bunch of code space, along with fixing up
the gps testing programs to deal with the structure changes.
In addition, the teledongle code needed to have the monitoring code
split into separate radio receiver and USB writer threads as the
packets are now back-to-back, and hence come too fast to wait for the
USB data to be sent to the host after each one.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_gps_test.c')
-rw-r--r-- | src/ao_gps_test.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ao_gps_test.c b/src/ao_gps_test.c index 44efb50c..93d7a9ab 100644 --- a/src/ao_gps_test.c +++ b/src/ao_gps_test.c @@ -30,7 +30,7 @@ #define AO_GPS_DATE_VALID (1 << 6) #define AO_GPS_COURSE_VALID (1 << 7) -struct ao_gps_data { +struct ao_gps_orig { uint8_t year; uint8_t month; uint8_t day; @@ -58,18 +58,22 @@ struct ao_gps_data { #define SIRF_SAT_ACQUISITION_FAILED (1 << 6) #define SIRF_SAT_EPHEMERIS_AVAILABLE (1 << 7) -struct ao_gps_sat_data { +struct ao_gps_sat_orig { uint8_t svid; uint8_t c_n_1; }; #define AO_MAX_GPS_TRACKING 12 -struct ao_gps_tracking_data { +struct ao_gps_tracking_orig { uint8_t channels; - struct ao_gps_sat_data sats[AO_MAX_GPS_TRACKING]; + struct ao_gps_sat_orig sats[AO_MAX_GPS_TRACKING]; }; +#define ao_telemetry_location ao_gps_orig +#define ao_telemetry_satellite ao_gps_tracking_orig +#define ao_telemetry_satellite_info ao_gps_sat_orig + void ao_mutex_get(uint8_t *mutex) { |