summaryrefslogtreecommitdiff
path: root/src/test/ao_gps_test_ublox.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-05-14 16:43:57 -0700
committerKeith Packard <keithp@keithp.com>2013-05-14 16:43:57 -0700
commit642b7c50f568c5f4499f51a61d203c9471787b6b (patch)
treee37f16d72fe143c6146d6a5051683ff9642917c9 /src/test/ao_gps_test_ublox.c
parente1c3fc8d2a1504b9801a710cbf79cfeb7daf4b66 (diff)
altos: Split out gps display function to separate file
Take the gps_dump function from ao_gps_skytraq.c and move it to a new file so it can be shared with the u-blox driver. That affects every skytraq and u-blox user as they need to include the new file. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/test/ao_gps_test_ublox.c')
-rw-r--r--src/test/ao_gps_test_ublox.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/ao_gps_test_ublox.c b/src/test/ao_gps_test_ublox.c
index 17e0220b..a0e04cb6 100644
--- a/src/test/ao_gps_test_ublox.c
+++ b/src/test/ao_gps_test_ublox.c
@@ -77,6 +77,11 @@ struct ao_telemetry_satellite {
#define ao_gps_tracking_orig ao_telemetry_satellite
#define ao_gps_sat_orig ao_telemetry_satellite_info
+extern __xdata struct ao_telemetry_location ao_gps_data;
+extern __xdata struct ao_telemetry_satellite ao_gps_tracking_data;
+
+uint8_t ao_gps_mutex;
+
void
ao_mutex_get(uint8_t *mutex)
{
@@ -224,6 +229,7 @@ uint8_t ao_task_minimize_latency;
#define ao_usb_getchar() 0
#include "ao_gps_print.c"
+#include "ao_gps_show.c"
#include "ao_gps_ublox.c"
static void
@@ -342,10 +348,7 @@ void
ao_dump_state(void *wchan)
{
if (wchan == &ao_gps_data)
- ao_gps_print(&ao_gps_data);
- else
- ao_gps_tracking_print(&ao_gps_tracking_data);
- putchar('\n');
+ ao_gps_show();
return;
}