| | |
| | | //resp函数 |
| | | void PushAnchorDataArray(uint16_t ancid,int16_t dist,uint8_t battary);//找到自己的id信息对应位置更新自己的交互信息 |
| | | static void resp_msg_set_ts(uint8_t *ts_field, int64_t ts);//用来对应位置放入时间戳 |
| | | static uint16_t tagid_list[TAG_NUM_IN_SYS]; |
| | | uint16_t tagid_list[TAG_NUM_IN_SYS]; |
| | | uint16_t CmpTagInList(uint16_t tagid); |
| | | uint8_t Anchor_RecNearPoll(uint8_t ancrec_nearbasepos); |
| | | static uint8_t send_buffer[100]; |
| | | static uint8_t tagofflinetime[TAG_NUM_IN_SYS]; |
| | | uint8_t tagofflinetime[TAG_NUM_IN_SYS]; |
| | | uint32_t temp_count=0; |
| | | uint32_t temp_count1=0; |
| | | uint32_t temp_endcount1=0; |
| | |
| | | // .phy_cfg.rx_ant_id = UWB_RX_ANT_3, /* UWB RX antenna port */ |
| | | //}; |
| | | #ifdef UWB_MK8000_XB |
| | | static struct mk_uwb_configure config = { |
| | | struct mk_uwb_configure config = { |
| | | .phy_work_mode = (uint8_t)(PHY_TX | PHY_RX), |
| | | .phy_cfg.ch_num = 5, /* Channel number. */ |
| | | .phy_cfg.code_index = 9, /* TRX preamble code */ |
| | |
| | | }; |
| | | #endif |
| | | #ifdef UWB_DW1000_MBXJZ_OLD |
| | | static struct mk_uwb_configure config = { |
| | | struct mk_uwb_configure config = { |
| | | .phy_work_mode = (uint8_t)(PHY_TX | PHY_RX), |
| | | .phy_cfg.ch_num = 5, /* Channel number. */ |
| | | .phy_cfg.code_index = 9, /* TRX preamble code */ |
| | |
| | | } |
| | | uint32_t start_receive_count,end_receive_count,poll_timeout,current_count,temp_resp; |
| | | uint16_t anchordata_id[TAG_NUM_IN_SYS],anchordata_dist[TAG_NUM_IN_SYS]; |
| | | static uint8_t anchordata_bat[TAG_NUM_IN_SYS]; |
| | | static int8_t anchor_rssi[TAG_NUM_IN_SYS]; |
| | | uint8_t anchordata_bat[TAG_NUM_IN_SYS]; |
| | | int8_t anchor_rssi[TAG_NUM_IN_SYS]; |
| | | uint8_t anchordata_num = 0; |
| | | static int16_t tagdist_list[TAG_NUM_IN_SYS]; |
| | | int16_t tagdist_list[TAG_NUM_IN_SYS]; |
| | | uint16_t random_time; |
| | | //anchor |
| | | int32_t hist_dist; |
| | |
| | | // Anchor_RecNearPoll(i); |
| | | // } |
| | | taglist_pos=CmpTagInList(tag_id_recv); |
| | | if(taglist_num>=TAG_NUM_IN_SYS) |
| | | if(taglist_pos>=TAG_NUM_IN_SYS) |
| | | return 0; |
| | | for(i=0; i<rec_nearbase_num; i++) |
| | | { |