| | |
| | | uint16_t random_time; |
| | | //anchor |
| | | int32_t hist_dist; |
| | | int16_t temp_recdist_before_offset; |
| | | void PushAnchorDataArray(uint16_t ancid,int16_t dist,uint8_t battary) |
| | | { |
| | | uint8_t i; |
| | |
| | | anchordata_bat[i] = battary; |
| | | tagofflinetime[i]=0;//不断更新当前TAG对应离线时间 |
| | | // if(dist>0) |
| | | if(distance!=0x1ffff&&distance!=0) |
| | | if(temp_recdist_before_offset!=0x1ffff&&temp_recdist_before_offset!=0&&temp_recdist_before_offset!=0x7fff&&distance!=0x1ffff) |
| | | { |
| | | distance=dist*0.5+distance*0.5; |
| | | }else{ |
| | |
| | | for(i=0; i<rec_nearbase_num; i++) |
| | | { |
| | | if(rec_ancidlist[i] == dev_id) |
| | | { |
| | | { temp_recdist_before_offset=rec_ancdistlist[i]; |
| | | rec_ancdistlist[i]+=(int16_t)g_com_map[DIST_OFFSET]; |
| | | PushAnchorDataArray(tag_id_recv,rec_ancdistlist[i],battary); |
| | | } |
| | |
| | | { |
| | | if(rec_ancidlist[i] == dev_id) |
| | | { |
| | | temp_recdist_before_offset=rec_ancdistlist[i]; |
| | | rec_ancdistlist[i]+=(int16_t)g_com_map[DIST_OFFSET]; |
| | | PushAnchorDataArray(tag_id_recv,rec_ancdistlist[i],battary); |
| | | } |
| | | } |