From 526f2fbdaa4532c5bc0b6dffd7b9b84f784d7fef Mon Sep 17 00:00:00 2001
From: yincheng.zhong <634916154@qq.com>
Date: 星期一, 29 一月 2024 15:49:44 +0800
Subject: [PATCH] 1.76

---
 源码/核心板/Src/application/dw_app.c |   49 +++++++++++++++++++++++++++++--------------------
 1 files changed, 29 insertions(+), 20 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
index f1b6560..cf8745f 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
@@ -877,30 +877,39 @@
 			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;
 			tx_nearresp_msg[MESSAGE_TYPE_IDX]=NEAR_RESPONSE;
+            remotesend_state = 0;
 			tx_nearresp_msg[MOTORSTATE_INDEX]=(remotesend_state<<4)|(motorstate&0xf);
 			if(remotesend_state)
 			{

--
Gitblit v1.9.3