summaryrefslogtreecommitdiff
path: root/src/core/ao.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-10-14 22:41:43 -0700
committerKeith Packard <keithp@keithp.com>2013-10-14 22:41:43 -0700
commit039446f54ef6968a3f0b37ce32ca6bdcdbe62546 (patch)
treed66195ea4d80894af1b4ab771a6878abb770848a /src/core/ao.h
parent5c4b3658a96f1a64ccebf7bddda06b15b4ac4a6f (diff)
altos: Merge GPS logging into a single function
Create a new global, ao_gps_new, which indicates new GPS position and satellite data. Use ao_gps_new as the new sleep/wakeup address. Merge the separate gps position/satellite logging tasks into a single function which waits for new data and writes out the changed values. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao.h')
-rw-r--r--src/core/ao.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/ao.h b/src/core/ao.h
index e7320327..ea37885e 100644
--- a/src/core/ao.h
+++ b/src/core/ao.h
@@ -342,6 +342,10 @@ ao_spi_slave(void);
#define AO_GPS_DATE_VALID (1 << 6)
#define AO_GPS_COURSE_VALID (1 << 7)
+#define AO_GPS_NEW_DATA 1
+#define AO_GPS_NEW_TRACKING 2
+
+extern __xdata uint8_t ao_gps_new;
extern __pdata uint16_t ao_gps_tick;
extern __xdata uint8_t ao_gps_mutex;
extern __xdata struct ao_telemetry_location ao_gps_data;