From baf8b42fca25208021259fde69eabdd2fc31cefa Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期六, 25 三月 2023 18:38:23 +0800
Subject: [PATCH] 阶段性调试1

---
 Src/application/dw_app.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/Src/application/dw_app.c b/Src/application/dw_app.c
index b0eb720..aa689a3 100644
--- a/Src/application/dw_app.c
+++ b/Src/application/dw_app.c
@@ -1227,17 +1227,17 @@
 								}
 							}
 }
+extern void FZNearPoll(void);
 u32 id,error_times=0;
-
+u8 ttt = 1;
 extern float Height;
-void Tag_App(void)//发送模式(TAG标签)
+void UWBWkWp(void)
 {
-	static uint8_t diccount = 0;
-	//LED0_ON;
 	SPIx_CS_GPIO->BRR = SPIx_CS;
 	delay_us(700);
 	SPIx_CS_GPIO->BSRR = SPIx_CS;
 	id =  dwt_readdevid() ;
+    
 	    while (DWT_DEVICE_ID != id) 
     {
 		//	Dw1000_Init();
@@ -1250,6 +1250,16 @@
         }
     }
     error_times = 0;
+}
+void Tag_App(void)//发送模式(TAG标签)
+{
+	static uint8_t diccount = 0,diccount2;
+	//LED0_ON;
+    UWBWkWp();
+            if(0)
+        {
+             FZNearPoll();
+        }else{
 	switch(tag_state)
 	{
 		case REGPOLL:
@@ -1293,8 +1303,11 @@
         case SINGLEPOLL:
           //  Poll();
             break;
-	}
-    FZNearPoll();
+	}}
+        
+ FZNearPoll();
+
+    dwt_forcetrxoff();
      userkey_state = !GET_USERKEY;
 	dwt_entersleep();
 }

--
Gitblit v1.9.3