__xdata uint8_t ao_monitoring;
__pdata uint8_t ao_monitor_led;
-#define AO_MONITOR_RING 8
-
-__xdata union ao_monitor {
- struct ao_telemetry_raw_recv raw;
- struct ao_telemetry_orig_recv orig;
- struct ao_telemetry_tiny_recv tiny;
-} ao_monitor_ring[AO_MONITOR_RING];
-
-#define ao_monitor_ring_next(n) (((n) + 1) & (AO_MONITOR_RING - 1))
+__xdata union ao_monitor ao_monitor_ring[AO_MONITOR_RING];
__data uint8_t ao_monitor_head;
printf("%02x", byte);
}
printf("%02x\n", sum);
+ if (recv_raw.packet[ao_monitoring + 1] & PKT_APPEND_STATUS_1_CRC_OK) {
+ rssi = ((int16_t) recv_raw.packet[ao_monitoring] >> 1) - 74;
+ ao_rssi_set(rssi);
+ }
break;
}
ao_usb_flush();