| | |
| | | memcpy(&send_buffer[DIST_IDX], &tagdist_list[taglist_pos], 4); |
| | | } |
| | | motorstate =0; |
| | | if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE2]) |
| | | if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE2]&&tagdist_list[taglist_pos]>g_com_map[STATIONARY_TIME]) |
| | | { |
| | | if(flag_tag_distsmooth[taglist_pos]) |
| | | {motorstate =2; |
| | | }else{ |
| | | motorstate =0; |
| | | } |
| | | }else if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE3]) |
| | | { |
| | | if(flag_tag_distsmooth[taglist_pos]) |
| | | {motorstate =1; |
| | | }else{ |
| | | motorstate =0; |
| | | } |
| | | } |
| | | }else {motorstate =0;} |
| | | // if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE3]) |
| | | // { |
| | | // if(flag_tag_distsmooth[taglist_pos]) |
| | | // {motorstate =1; |
| | | // }else{ |
| | | // motorstate =0; |
| | | // } |
| | | // } |
| | | send_buffer[GROUP_ID_IDX] = group_id; |
| | | //send_buffer[MAINBASE_INDEX]=flag_syncbase; |
| | | send_buffer[MESSAGE_TYPE_IDX]=NEAR_RESPONSE; |