summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-05-01 08:56:57 -0700
committerKeith Packard <keithp@keithp.com>2013-05-01 08:56:57 -0700
commitfd16f97634cf74fcec001ce2e38ff262730f15a9 (patch)
tree95f1a322411961adf81b85daf99d9306c70aa587
parent1b2b75631880e54ed9979cb3106fdfdeba4f6e44 (diff)
altos: Mark GPS telemetry packets with GPS time stamp
This provides a reasonable accurate indication of the system time when the GPS location data was received, and also makes sure GPS packets get some timestamp when no other telemetry is being transmitted. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/core/ao_telemetry.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c
index 03aa48d8..17c69c25 100644
--- a/src/core/ao_telemetry.c
+++ b/src/core/ao_telemetry.c
@@ -230,6 +230,7 @@ ao_send_location(void)
ao_xmemcpy(&telemetry.location.flags,
&ao_gps_data.flags,
26);
+ telemetry.location.tick = ao_gps_tick;
ao_mutex_put(&ao_gps_mutex);
ao_radio_send(&telemetry, sizeof (telemetry));
ao_telemetry_loc_cur = ao_telemetry_config_max;
@@ -243,6 +244,7 @@ ao_send_satellite(void)
{
telemetry.generic.type = AO_TELEMETRY_SATELLITE;
ao_mutex_get(&ao_gps_mutex);
+ telemetry.satellite.tick = ao_gps_tick;
telemetry.satellite.channels = ao_gps_tracking_data.channels;
ao_xmemcpy(&telemetry.satellite.sats,
&ao_gps_tracking_data.sats,