void
ao_monitor(void)
{
- __xdata struct ao_radio_recv recv;
+ __xdata struct ao_telemetry_recv recv;
__xdata char callsign[AO_MAX_CALLSIGN+1];
uint8_t state;
int16_t rssi;
for (;;) {
__critical while (!ao_monitoring)
ao_sleep(&ao_monitoring);
- if (!ao_radio_recv(&recv))
+ if (!ao_radio_recv(&recv, sizeof (recv)))
continue;
state = recv.telemetry.flight_state;
if (state > ao_flight_invalid)
state = ao_flight_invalid;
if (recv.status & PKT_APPEND_STATUS_1_CRC_OK) {
- printf("VERSION %d CALL %s SERIAL %3d FLIGHT %5u RSSI %4d STATUS %02x STATE %7s ",
+ printf("VERSION %d CALL %s SERIAL %d FLIGHT %5u RSSI %4d STATUS %02x STATE %7s ",
AO_TELEMETRY_VERSION,
callsign,
- recv.telemetry.addr,
+ recv.telemetry.serial,
recv.telemetry.flight,
rssi, recv.status,
ao_state_names[state]);
ao_monitoring = monitoring;
ao_wakeup(&ao_monitoring);
if (!ao_monitoring)
- ao_radio_abort();
+ ao_radio_recv_abort();
}
static void
}
__code struct ao_cmds ao_monitor_cmds[] = {
- { 'm', set_monitor, "m <0 off, 1 on> Enable/disable radio monitoring" },
- { 0, set_monitor, NULL },
+ { set_monitor, "m <0 off, 1 on>\0Enable/disable radio monitoring" },
+ { 0, NULL },
};
void