| | |
| | | }else{ |
| | | memcpy(&tx_nearresp_msg[DIST_IDX], &tagdist_list[taglist_pos], 4); |
| | | } |
| | | |
| | | if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE1]) |
| | | { |
| | | motorstate =0; |
| | | }else if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE2]) |
| | | { |
| | | motorstate =2; |
| | | }else if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE3]) |
| | | { |
| | | motorstate =1; |
| | | }else{ |
| | | motorstate =0; |
| | | } |
| | | if(tag_id_recv>>12!=9) |
| | | { |
| | | if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE1]) |
| | | { |
| | | motorstate =0; |
| | | }else if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE2]) |
| | | { |
| | | motorstate =2; |
| | | }else if(tagdist_list[taglist_pos]<g_com_map[ALARM_DISTANCE3]) |
| | | { |
| | | motorstate =1; |
| | | }else{ |
| | | motorstate =0; |
| | | } |
| | | }else{ |
| | | if(tagdist_list[taglist_pos]<g_com_map[RELAY2_DISTANCE1]) |
| | | { |
| | | motorstate =0; |
| | | }else if(tagdist_list[taglist_pos]<g_com_map[RELAY2_DISTANCE2]) |
| | | { |
| | | motorstate =2; |
| | | }else if(tagdist_list[taglist_pos]<g_com_map[RELAY2_DISTANCE3]) |
| | | { |
| | | motorstate =1; |
| | | }else{ |
| | | motorstate =0; |
| | | } |
| | | } |
| | | |
| | | tx_nearresp_msg[GROUP_ID_IDX] = group_id; |
| | | tx_nearresp_msg[MAINBASE_INDEX]=flag_syncbase; |