summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/Makefile4
-rw-r--r--src/test/ao_gps_test_skytraq.c12
-rw-r--r--src/test/ao_gps_test_ublox.c11
3 files changed, 16 insertions, 11 deletions
diff --git a/src/test/Makefile b/src/test/Makefile
index 169c1dc6..8032a163 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -35,10 +35,10 @@ ao_flight_test_mm: ao_flight_test.c ao_host.h ao_flight.c ao_sample.c ao_kalman.
ao_gps_test: ao_gps_test.c ao_gps_sirf.c ao_gps_print.c ao_host.h
cc $(CFLAGS) -o $@ $<
-ao_gps_test_skytraq: ao_gps_test_skytraq.c ao_gps_skytraq.c ao_gps_print.c ao_host.h
+ao_gps_test_skytraq: ao_gps_test_skytraq.c ao_gps_skytraq.c ao_gps_print.c ao_gps_show.c ao_host.h
cc $(CFLAGS) -o $@ $<
-ao_gps_test_ublox: ao_gps_test_ublox.c ao_gps_ublox.c ao_gps_print.c ao_host.h ao_gps_ublox.h
+ao_gps_test_ublox: ao_gps_test_ublox.c ao_gps_ublox.c ao_gps_print.c ao_gps_show.c ao_host.h ao_gps_ublox.h
cc $(CFLAGS) -o $@ $<
ao_convert_test: ao_convert_test.c ao_convert.c altitude.h
diff --git a/src/test/ao_gps_test_skytraq.c b/src/test/ao_gps_test_skytraq.c
index 81008b39..89cbd767 100644
--- a/src/test/ao_gps_test_skytraq.c
+++ b/src/test/ao_gps_test_skytraq.c
@@ -75,6 +75,11 @@ struct ao_gps_tracking_orig {
#define ao_telemetry_satellite ao_gps_tracking_orig
#define ao_telemetry_satellite_info ao_gps_sat_orig
+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)
{
@@ -432,17 +437,14 @@ uint8_t ao_task_minimize_latency;
#define ao_usb_getchar() 0
#include "ao_gps_print.c"
+#include "ao_gps_show.c"
#include "ao_gps_skytraq.c"
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');
- return;
+ ao_gps_show();
}
int
diff --git a/src/test/ao_gps_test_ublox.c b/src/test/ao_gps_test_ublox.c
index 80671735..afd4dba4 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;
}