| | |
| | | memcpy(&tx_nearresp_msg[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_DISTANCE1]||tagdist_list[taglist_pos]==0) |
| | | { |
| | | motorstate =0; |
| | | }else if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE2]) |
| | | { |
| | | if(flag_tag_distsmooth[taglist_pos]) |
| | | {motorstate =2; |
| | |
| | | motorstate =0; |
| | | } |
| | | } |
| | | tx_nearresp_msg[GROUP_ID_IDX] = group_id; |
| | | tx_nearresp_msg[GROUP_ID_IDX] = group_id; |
| | | tx_nearresp_msg[MAINBASE_INDEX]=flag_syncbase; |
| | | tx_nearresp_msg[MESSAGE_TYPE_IDX]=NEAR_RESPONSE; |
| | | tx_nearresp_msg[MOTORSTATE_INDEX]=motorstate;//(remotesend_state<<4)|motorstate; |