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_skytraq.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_skytraq.c')
| -rw-r--r-- | src/ao_gps_skytraq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ao_gps_skytraq.c b/src/ao_gps_skytraq.c index 6099ca96..84743ff5 100644 --- a/src/ao_gps_skytraq.c +++ b/src/ao_gps_skytraq.c @@ -29,13 +29,13 @@ static __xdata uint8_t ao_gps_cksum; static __xdata uint8_t ao_gps_error; __xdata uint16_t ao_gps_tick; -__xdata struct ao_gps_data ao_gps_data; -__xdata struct ao_gps_tracking_data ao_gps_tracking_data; +__xdata struct ao_telemetry_location ao_gps_data; +__xdata struct ao_telemetry_satellite ao_gps_tracking_data; static __xdata uint16_t ao_gps_next_tick; -static __xdata struct ao_gps_data ao_gps_next; +static __xdata struct ao_telemetry_location ao_gps_next; static __xdata uint8_t ao_gps_date_flags; -static __xdata struct ao_gps_tracking_data ao_gps_tracking_next; +static __xdata struct ao_telemetry_satellite ao_gps_tracking_next; #define STQ_S 0xa0, 0xa1 #define STQ_E 0x0d, 0x0a @@ -265,7 +265,7 @@ ao_nmea_gga() if (!ao_gps_error) { ao_mutex_get(&ao_gps_mutex); ao_gps_tick = ao_gps_next_tick; - memcpy(&ao_gps_data, &ao_gps_next, sizeof (struct ao_gps_data)); + memcpy(&ao_gps_data, &ao_gps_next, sizeof (ao_gps_data)); ao_mutex_put(&ao_gps_mutex); ao_wakeup(&ao_gps_data); } |
