From d8dd7c6e256bc607904ef1c1b1a36471c99db873 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期二, 21 十一月 2023 14:58:09 +0800 Subject: [PATCH] 免布线lora,调试差不多,即将加入自动跳频功能,固提交保存 --- Src/application/dw_ancapp.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Src/application/dw_ancapp.c b/Src/application/dw_ancapp.c index 2f5f250..39314f0 100644 --- a/Src/application/dw_ancapp.c +++ b/Src/application/dw_ancapp.c @@ -229,19 +229,21 @@ // result = dwt_starttx(DWT_START_TX_DELAYED); //// uwb_timeout = 0; // if(result == 0) +// { uwb_timeout=lp_time; - while (!((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & (SYS_STATUS_TXFRS | SYS_STATUS_ALL_RX_ERR)))///不断查询芯片状态直到接收成功或者出现错误 + while (!((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & SYS_STATUS_TXFRS ))///不断查询芯片状态直到接收成功或者出现错误 { - current_time=HAL_LPTIM_ReadCounter(&hlptim1); - if(current_time>end_time+((32768/1000)*3)/*||current_time<end_time+15000*/) - { -// printf("debug2 timec:%d timee:%d\r\n",current_time,end_time); - break;} +// current_time=HAL_LPTIM_ReadCounter(&hlptim1); +// if(current_time>end_time+((32768/1000)*3)||current_time<end_time+15000) +// { +//// printf("debug2 timec:%d timee:%d\r\n",current_time,end_time); +// break;} if(lp_time-uwb_timeout>2) break; }; - dwt_rxenable(0); +// } +// dwt_rxenable(0); } -- Gitblit v1.9.3