From 11e279420324ddd19266d58be21d1abdfc927ea7 Mon Sep 17 00:00:00 2001
From: yincheng.zhong <634916154@qq.com>
Date: 星期四, 07 三月 2024 16:19:31 +0800
Subject: [PATCH] V1.9 调整同步信号,提前5ms接收,超时时间增加5ms,同步更稳定

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

diff --git a/Src/application/dw_app.c b/Src/application/dw_app.c
index c040cb8..7af13fe 100644
--- a/Src/application/dw_app.c
+++ b/Src/application/dw_app.c
@@ -72,7 +72,7 @@
 #define FINAL_MSG_FINAL_TX_TS_IDX 18
 #define FINAL_MSG_TS_LEN 4
 
-#define _UWB_4G
+//#define _UWB_4G
 
 static dwt_config_t config = {
 #ifdef _UWB_4G
@@ -250,7 +250,7 @@
 typedef enum{	Next_Poll_RANGE,
                 Next_Poll_LORASYNC,
 }nextpoll_enum;
-nextpoll_enum next_poll_state;
+nextpoll_enum next_poll_state = Next_Poll_RANGE;
 extern uint8_t sync_lost_count;
 void Tag_App(void)//发送模式(TAG标签)
 {  	
@@ -285,7 +285,7 @@
 //          target_count = GetLoraSyncCount()-(18000)/LPTIMER_LSB+sync_lost_count*1000;
 //      }else
       {
-        target_count = GetLoraSyncCount()-(18000)/LPTIMER_LSB;  //比上次收到的lora提前17ms唤醒(lora接收大概17ms),如果在同步间隔内,则会快速进入休眠。
+        target_count = GetLoraSyncCount()-(23000)/LPTIMER_LSB;  //比上次收到的lora提前17ms唤醒(lora接收大概17ms),如果在同步间隔内,则会快速进入休眠。
       }
       if(target_count<0)
       target_count+=32768;

--
Gitblit v1.9.3