From e92e2e8b0a7dcd307ca4756bdfec80d22d620c31 Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期二, 22 十月 2024 16:49:34 +0800 Subject: [PATCH] 无改动现在稳定测距低功耗版本 --- keil/uwb_tag_.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/keil/uwb_tag_.c b/keil/uwb_tag_.c index e27aa6a..5dafa93 100644 --- a/keil/uwb_tag_.c +++ b/keil/uwb_tag_.c @@ -25,7 +25,7 @@ #define POLL_DELAY 100U //yuan100U /* Receive response timeout */ -#define RESP_RX_TIMEOUT_US 5000U //Yuan500 10mssuccess 300jixian +#define RESP_RX_TIMEOUT_US 2500U //Yuan500 10mssuccess 300jixian /* Field index in frame */ #define MSG_SEQ_NUM_IDX 2 @@ -33,7 +33,7 @@ #define FINAL_MSG_RESP_RX_TS_IDX 14 #define FINAL_MSG_FINAL_TX_TS_IDX 18 #define DELAY_DEFAULT 50000 -#define DELAY_BETWEEN_TWO_FRAME_UUS 1400 +#define DELAY_BETWEEN_TWO_FRAME_UUS 600 //yuan1400 #define HALF_SECOND_TIME 62400000 uint16_t CmpTagInList(uint16_t tagid); @@ -368,6 +368,7 @@ return temp; } uint32_t count_index; +int tt=1; int TagRange(void) { // The following peripherals will be initialized in the uwb_open function @@ -428,6 +429,7 @@ {end_receive_count-=UINT32_MAX;} current_count=phy_timer_count_get(); count_index=end_receive_count+HALF_SECOND_TIME; +// if(tt){ while(current_count<end_receive_count||current_count>end_receive_count+HALF_SECOND_TIME)//循环接受包体,若为124.8K则是+62400000 { @@ -475,7 +477,8 @@ gpio_pin_clr(IO_PIN_5);//测试 gpio_pin_set(IO_PIN_5);//测试 #endif - } + } +// } #ifdef BOXING gpio_pin_clr(IO_PIN_5);//测试 #endif -- Gitblit v1.9.3