| | |
| | | NEARPOLL, |
| | | }tag_state=GETNEARMSG; |
| | | static dwt_config_t config = { |
| | | 2, /* Channel number. */ |
| | | 3, /* Channel number. */ |
| | | DWT_PRF_64M, /* Pulse repetition frequency. */ |
| | | DWT_PLEN_64, /* Preamble length. */ |
| | | DWT_PLEN_128, /* Preamble length. */ |
| | | DWT_PAC8, /* Preamble acquisition chunk size. Used in RX only. */ |
| | | 9, /* TX preamble code. Used in TX only. */ |
| | | 9, /* RX preamble code. Used in RX only. */ |
| | |
| | | static uint8_t tx_final_msg[60] = {0}; |
| | | static uint8_t tx_resp_msg[22] = {0}; |
| | | static uint8_t tx_nearpoll_msg[80] = {0}; |
| | | static uint8_t tx_nearresp_msg[80] = {0}; |
| | | static uint8_t tx_nearresp_msg[90] = {0}; |
| | | static uint8_t tx_nearfinal_msg[80] = {0}; |
| | | |
| | | static uint8_t tx_near_msg[80] = {0}; |
| | |
| | | } |
| | | uint32_t time_monitor[10]; |
| | | extern uint16_t configremotetagID; |
| | | extern u8 remotetag_paralen; |
| | | extern u8 remotetag_paralen,userdatasend_flag[TAG_NUM_IN_SYS]; |
| | | u8 finalsend=0; |
| | | u16 signalpower_list[TAG_NUM_IN_SYS]; |
| | | uint32_t poll_tx_ts, resp_rx_ts, final_tx_ts; |
| | |
| | | dwt_setrxaftertxdelay(RESP_TX_TO_FINAL_RX_DLY_UUS+(rec_nearbase_num+1-ancrec_nearbasepos)*DELAY_BETWEEN_TWO_FRAME_UUS);//设置åé宿åå¼å¯æ¥æ¶å»¶è¿æ¶é´ |
| | | dwt_setrxtimeout(FINAL_RX_TIMEOUT_UUS);//æ¥æ¶è¶
æ¶æ¶é´ |
| | | //dwt_readdiagnostics(&d1); |
| | | if(tagpos[taglist_pos].tagid==tag_id_recv) |
| | | if(tagpos[taglist_pos].tagid==tag_id_recv&&userdatasend_flag[taglist_pos] == 1) |
| | | { |
| | | memcpy(&tx_nearresp_msg[TAGPOS_INDEX],&tagpos[taglist_pos],tagpos[taglist_pos].datalen+3); |
| | | tagpossend_flag = 1; |
| | |
| | | LED0_BLINK; //æ¯æå䏿¬¡é讯åéªç䏿¬¡ |
| | | dis_after_filter=dist_cm; |
| | | hex_dist = dist_cm+(int16_t)g_com_map[DIST_OFFSET]; |
| | | |
| | | userdatasend_flag[taglist_pos] =0; |
| | | if(hex_dist>-1000&&hex_dist<200000) |
| | | { |
| | | g_flag_Taggetdist[taglist_pos]=0; |
| | |
| | | { |
| | | uint16_t checksum; |
| | | case DISCOVERPOLL: |
| | | if (anchor_type == rx_buffer[ANCHOR_ID_IDX]) |
| | | if (anchor_type == rx_buffer[ANCHOR_ID_IDX]&&g_com_map[NEARSWITCH_DISTANCE_INDEX] != 0) |
| | | { |
| | | taglist_pos=CmpTagInList(tag_id_recv); |
| | | if(taglist_pos==taglist_num) |