| | |
| | | /* RX done process handler. */ |
| | | int8_t rssi; |
| | | uint32_t range_timeout_us = 2000000;//yuan5000 |
| | | uint8_t flag_temp2,flag_temp1; |
| | | uint8_t flag_temp2,flag_temp1,resp_tx_flag; |
| | | uint16_t uwb_losttimer; |
| | | static void rx_int_callback(struct MAC_HW_REPORT_T *rx_report) |
| | | { uint8_t valid_sts=0; |
| | |
| | | |
| | | /** UWB RX success */ |
| | | if (rx_report->err_code == UWB_RX_OK) |
| | | { |
| | | { resp_tx_flag=0; |
| | | /* Received data does not contain FCS */ |
| | | rx_length = rx_report->pkt_len; |
| | | memcpy(rx_buf, rx_report->pkt_data, rx_length); |
| | |
| | | rssi = rx_report->rssi; |
| | | receive_flag=1; |
| | | Anchor_App(); |
| | | if(resp_tx_flag==0) |
| | | { |
| | | OpenUWB(); |
| | | } |
| | | #ifdef STS_MODE |
| | | valid_sts= sts_valid_check(); |
| | | if (valid_sts) |
| | |
| | | temp_count= phy_timer_count_get(); |
| | | memcpy(&rx_rpt, rx_report, sizeof(struct MAC_HW_REPORT_T)); |
| | | rx_length = 0; |
| | | // OpenUWB();//再次开启UWB接收 |
| | | OpenUWB();//再次开启UWB接收 |
| | | } |
| | | OpenUWB();//再次开启UWB接收 |
| | | //OpenUWB();//再次开启UWB接收 |
| | | } |
| | | |
| | | /* TX done process handler. */ |
| | |
| | | { |
| | | temp_count= phy_timer_count_get(); |
| | | temp_internal=temp_count; |
| | | OpenUWB(); |
| | | resp_tx_num++; |
| | | // OpenUWB();//再次开启UWB接收 |
| | | //LOG_INFO(TRACE_MODULE_APP, "poll_rx_num is %d,resp_tx_num is %d\r\n",poll_rx_num,resp_tx_num); |
| | |
| | | for(i=0; i<taglist_num; i++) |
| | | { |
| | | |
| | | if(tagofflinetime[i]++<REPORT_TAG_KEEPTIMES) |
| | | if(tagofflinetime[i]<REPORT_TAG_KEEPTIMES) |
| | | { |
| | | report_ancid[k]=tagid_list[i]; |
| | | report_ancdist[k++]=(uint16_t)tagdist_list[i]; |
| | |
| | | temp_resp_i64=resp_tx_ts_i64; |
| | | temp_count3= phy_timer_count_get(); |
| | | flag_temp2=uwb_tx(send_buffer, 40,1 ,resp_tx_en_start_u32);//立即发送测试size大小 |
| | | resp_tx_flag=1;//限制重复开启 |
| | | tagofflinetime[taglist_pos] = 0;//更新标签通信 |
| | | // temp_count1=phy_timer_count_get(); |
| | | //while(mac_is_busy()); |
| | |
| | | if(secondtask_search_flag)//更新S时间TICK |
| | | { |
| | | HIDO_TimerTick(); |
| | | TagListUpdate(); |
| | | //TagListUpdate(); |
| | | // GPS_Poll(); |
| | | // if(nomove_count<=g_com_map[NOMOVESLEEP_TIME])//防止溢出 |
| | | // nomove_count++; |