altos: Set tick value in new TeleMetrum v2 sensor packets
authorKeith Packard <keithp@keithp.com>
Fri, 6 Sep 2013 05:57:19 +0000 (22:57 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 6 Sep 2013 05:57:19 +0000 (22:57 -0700)
Was getting left with the old value, which wasn't very useful

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_telemetry.c

index cd95aa6bce3d0a995d70b6fd30a90d49a75ca07a..6b47a06a1cbf42dec3a81d2cb105abf953cf55b4 100644 (file)
@@ -182,6 +182,7 @@ ao_send_metrum_sensor(void)
 {
        __xdata struct ao_data *packet = (__xdata struct ao_data *) &ao_data_ring[ao_data_ring_prev(ao_sample_data)];
 
 {
        __xdata struct ao_data *packet = (__xdata struct ao_data *) &ao_data_ring[ao_data_ring_prev(ao_sample_data)];
 
+       telemetry.generic.tick = packet->tick;
        telemetry.generic.type = AO_TELEMETRY_METRUM_SENSOR;
 
        telemetry.metrum_sensor.state = ao_flight_state;
        telemetry.generic.type = AO_TELEMETRY_METRUM_SENSOR;
 
        telemetry.metrum_sensor.state = ao_flight_state;