X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fao_monitor.c;h=9c4be6fbd2be6a8cdde664d8f39d00adcc2a1b4c;hb=c826fab31f8aea25a942b6bb8435d4b04c1bef10;hp=f019d3b431a0481af12620280e58b8e87f845624;hpb=a9ec6be0e92dee01f7aac006ef6f7779c1da1b36;p=fw%2Faltos diff --git a/src/ao_monitor.c b/src/ao_monitor.c index f019d3b4..9c4be6fb 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 @@ -96,8 +96,8 @@ set_monitor(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