X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fao_monitor.c;h=4ba3da6d848949b27e31495bbde9af68fb56c9eb;hb=92d7841edcfc8a841f71f7f97cc541f8e55c4627;hp=f019d3b431a0481af12620280e58b8e87f845624;hpb=e747954b6a9e71705f619684df8a118a909b1039;p=fw%2Faltos diff --git a/src/ao_monitor.c b/src/ao_monitor.c index f019d3b4..4ba3da6d 100644 --- a/src/ao_monitor.c +++ b/src/ao_monitor.c @@ -23,7 +23,7 @@ __pdata uint8_t ao_monitor_led; 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; @@ -31,7 +31,7 @@ ao_monitor(void) 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; @@ -41,10 +41,10 @@ ao_monitor(void) 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]); @@ -85,7 +85,7 @@ ao_set_monitor(uint8_t monitoring) ao_monitoring = monitoring; ao_wakeup(&ao_monitoring); if (!ao_monitoring) - ao_radio_abort(); + ao_radio_recv_abort(); } static void