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_sirf.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_sirf.c')
| -rw-r--r-- | src/ao_gps_sirf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ao_gps_sirf.c b/src/ao_gps_sirf.c index 87b1d69c..5827c687 100644 --- a/src/ao_gps_sirf.c +++ b/src/ao_gps_sirf.c @@ -21,8 +21,8 @@ __xdata uint8_t ao_gps_mutex; __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 const char ao_gps_set_nmea[] = "\r\n$PSRF100,0,57600,8,1,0*37\r\n"; @@ -406,6 +406,7 @@ ao_gps(void) __reentrant ao_gps_data.hdop = ao_sirf_data.hdop; ao_gps_data.climb_rate = ao_sirf_data.climb_rate; ao_gps_data.flags |= AO_GPS_COURSE_VALID; +#if 0 if (ao_sirf_data.h_error > 6553500) ao_gps_data.h_error = 65535; else @@ -414,6 +415,7 @@ ao_gps(void) __reentrant ao_gps_data.v_error = 65535; else ao_gps_data.v_error = ao_sirf_data.v_error / 100; +#endif ao_mutex_put(&ao_gps_mutex); ao_wakeup(&ao_gps_data); break; |
