diff options
author | Keith Packard <keithp@keithp.com> | 2009-11-15 15:59:01 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-11-15 15:59:01 -0800 |
commit | 3ee279ba76c2a79d142c466f19ef758cf4c01d70 (patch) | |
tree | c6fbd4dc087d931c5566bb03da464baaa7cd7b91 /ao-tools/lib | |
parent | 6391c89bd5b89f5f46255b8365c658a873e5959a (diff) |
Add flight number to telemetry stream.
This makes it easier to tie the telemetry and eeprom files together as
they're now both labeled with serial and flight numbers, which should
be unique.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/lib')
-rw-r--r-- | ao-tools/lib/cc-telem.c | 7 | ||||
-rw-r--r-- | ao-tools/lib/cc.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ao-tools/lib/cc-telem.c b/ao-tools/lib/cc-telem.c index f82ab961..0e1483f7 100644 --- a/ao-tools/lib/cc-telem.c +++ b/ao-tools/lib/cc-telem.c @@ -93,6 +93,13 @@ cc_telem_parse(const char *input_line, struct cc_telem *telem) cc_parse_string(telem->callsign, sizeof (telem->callsign), words[1]); cc_parse_int(&telem->serial, words[3]); + if (version >= 2) { + cc_parse_int(&telem->flight, words[5]); + words += 2; + nword -= 2; + } else + telem->flight = 0; + cc_parse_int(&telem->rssi, words[5]); cc_parse_string(telem->state, sizeof (telem->state), words[9]); cc_parse_int(&telem->tick, words[10]); diff --git a/ao-tools/lib/cc.h b/ao-tools/lib/cc.h index fd461e5c..b8e3c061 100644 --- a/ao-tools/lib/cc.h +++ b/ao-tools/lib/cc.h @@ -238,6 +238,7 @@ struct cc_gps_tracking { struct cc_telem { char callsign[16]; int serial; + int flight; int rssi; char state[16]; int tick; |