diff options
author | Keith Packard <keithp@keithp.com> | 2009-04-25 14:42:20 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-04-25 14:42:20 -0700 |
commit | e45fce7f82d704d677f84c69b0e07588d109d780 (patch) | |
tree | 05161a95f3c9263635cc403bf42ca63877b9c7f0 /ao_monitor.c | |
parent | 61510f98404bca6861b2da98f6cd9ba9deb76968 (diff) |
Add RDF beacon and callsign to telemetry
Diffstat (limited to 'ao_monitor.c')
-rw-r--r-- | ao_monitor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ao_monitor.c b/ao_monitor.c index 15b56f05..d62f69da 100644 --- a/ao_monitor.c +++ b/ao_monitor.c @@ -29,6 +29,7 @@ void ao_monitor(void) { __xdata struct ao_radio_recv recv; + __xdata char callsign[AO_MAX_CALLSIGN+1]; uint8_t state; for (;;) { @@ -36,10 +37,13 @@ ao_monitor(void) ao_sleep(&ao_monitoring); ao_radio_recv(&recv); state = recv.telemetry.flight_state; + memcpy(callsign, recv.telemetry.callsign, AO_MAX_CALLSIGN); if (state > ao_flight_invalid) state = ao_flight_invalid; - printf ("SERIAL %3d RSSI %3d STATUS %02x STATE %s ", - recv.telemetry.addr, recv.rssi, recv.status, + printf ("CALL %s SERIAL %3d RSSI %3d STATUS %02x STATE %s ", + callsign, + recv.telemetry.addr, + (int) recv.rssi - 74, recv.status, ao_state_names[state]); if (!(recv.status & PKT_APPEND_STATUS_1_CRC_OK)) printf("CRC INVALID "); |