| | |
| | | #include "board.h" |
| | | |
| | | #if PDOA_3D_EN |
| | | #define PDOA_3D_SUPPORT_NUM 100 |
| | | #define PDOA_3D_SUPPORT_NUM 10 |
| | | #define PDOA_3D_TIMEOUT_MS 2000 |
| | | static struct PDOA_3D_MAC_ADDR_T mac_addr_cache[PDOA_3D_SUPPORT_NUM]; |
| | | static struct PDOA_3D_PDOA_DATA_T pdoa_data_cache[PDOA_3D_SUPPORT_NUM]; |
| | |
| | | |
| | | void aoa_process(const struct MAC_HW_REPORT_T *ind) |
| | | { |
| | | power_off_radio(); |
| | | |
| | | if (uwb_app_config.session_param.device_role == DEV_ROLE_INITIATOR) |
| | | { |
| | | phy_timer_target_set(aoa_env.anchor_point + aoa_env.ranging_period - UWB_EVT_PREFETCH_TIME, aoa_timer_callback); |
| | |
| | | if (aoa_env.stage == AOA_SYNC) |
| | | { |
| | | sts_lsp_store(); |
| | | power_on_radio(0, 1); |
| | | mac_rx(EVT_MODE_MAC_PHY_ASAP, 0, aoa_env.ranging_period); |
| | | mac_start(); |
| | | return; |
| | |
| | | } |
| | | phy_timer_target_set(aoa_env.anchor_point + aoa_env.ranging_period - UWB_EVT_PREFETCH_TIME, aoa_timer_callback); |
| | | } |
| | | |
| | | power_off_radio(); |
| | | } |
| | | |
| | | void aoa_done(const struct MAC_HW_REPORT_T *rx) |
| | |
| | | { |
| | | ind->hdr.event = AOA_DONE_MSG; |
| | | ind->status = rx->err_code; |
| | | ind->rssi = rx->rssi; |
| | | ind->snr = rx->snr; |
| | | // ind->rssi = rx->rssi; |
| | | ind->rssi = correct_rssi(rx->rssi); |
| | | ind->snr = correct_snr(rx->snr); |
| | | |
| | | if ((rx->pkt_len) && (rx->pkt_data != NULL)) |
| | | { |