diff options
author | Keith Packard <keithp@keithp.com> | 2012-09-09 13:10:07 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-09-09 13:10:07 -0700 |
commit | bb5ab29b6744b382bb2f09486a7a6db7d12a3608 (patch) | |
tree | 2d9cf3dacd4c7c95c1726fc409ae896483deeab2 | |
parent | 47d87872c11a63a435fe5b703a4ce33503790d96 (diff) |
ao_tools/ao-send-telem: Only start real-time on valid states
Check state to make sure it is < ao_flight_landed to keep invalid
states from switching to real-time playback mode.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | ao-tools/ao-send-telem/ao-send-telem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ao-tools/ao-send-telem/ao-send-telem.c b/ao-tools/ao-send-telem/ao-send-telem.c index db061377..3db44542 100644 --- a/ao-tools/ao-send-telem/ao-send-telem.c +++ b/ao-tools/ao-send-telem/ao-send-telem.c @@ -224,8 +224,10 @@ main (int argc, char **argv) last_tick = telem.generic.tick; send_telem(cc, &telem); } else { + enum ao_flight_state state = packet_state(&telem); add_telem(&telem); - if (packet_state(&telem) > ao_flight_pad) { + if (ao_flight_pad < state && state < ao_flight_landed) { + printf ("started\n"); started = 1; last_tick = send_queued(cc, realtime); } |