altos: Mark GPS telemetry packets with GPS time stamp
authorKeith Packard <keithp@keithp.com>
Wed, 1 May 2013 15:56:57 +0000 (08:56 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 8 May 2013 03:08:01 +0000 (20:08 -0700)
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>
src/core/ao_telemetry.c

index 03aa48d87b54deb11ad33fb931839b8ea0482164..c3bbfec5aa7d40468f903ab53919985979020636 100644 (file)
@@ -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;