yincheng.zhong
2024-01-29 526f2fbdaa4532c5bc0b6dffd7b9b84f784d7fef
源码/核心板/Src/application/dw_app.c
@@ -877,26 +877,34 @@
         dwt_setrxtimeout(FINAL_RX_TIMEOUT_UUS);//鎺ユ敹瓒呮椂鏃堕棿
         
         
         if(new_tagid)
         {
            tagdist_list[taglist_pos]=0x1ffff;
            memcpy(&tx_nearresp_msg[DIST_IDX], &tagdist_list[taglist_pos], 4);
         }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;