From 23f26e8d4cea6619caff53235b92bd2dd4eed76e Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期四, 03 八月 2023 17:23:29 +0800 Subject: [PATCH] 版本v2.6,修改5v输入检测错误bug --- Src/application/dw_app.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Src/application/dw_app.c b/Src/application/dw_app.c index 226c813..896be93 100644 --- a/Src/application/dw_app.c +++ b/Src/application/dw_app.c @@ -29,7 +29,7 @@ #include <stdio.h> #include "beep.h" #include "modbus.h" - +#include "BMP390.h" /*------------------------------------ Marcos ------------------------------------------*/ /* Inter-ranging delay period, in milliseconds. */ #define RNG_DELAY_MS 100 @@ -81,7 +81,7 @@ SINGLEPOLL, }tag_state=STARTPOLL; dwt_config_t config = { - 2, /* Channel number. */ + 5, /* Channel number. */ DWT_PRF_64M, /* Pulse repetition frequency. */ DWT_PLEN_128, /* Preamble length. */ DWT_PAC8, /* Preamble acquisition chunk size. Used in RX only. */ @@ -1270,6 +1270,7 @@ } u32 id,error_times=0; extern float Height; +extern float Altitude; void Tag_App(void)//发送模式(TAG标签) { @@ -1297,6 +1298,7 @@ LED_LG_ON; Registor_Poll(); LED_LG_OFF; +// GetPressAndHeight(); break; case DISCPOLL: LED_LG_ON; @@ -1315,13 +1317,15 @@ break; case NEARPOLL: NearPoll(); - //GetPressAndHeight(); - //intheight = Height*100; + GetPressAndHeight(); + intheight =Altitude*100; break; case SINGLEPOLL: // Poll(); break; } + GetPressAndHeight(); + intheight =Altitude*100; userkey_state = !GET_USERKEY; dwt_forcetrxoff(); dwt_setinterrupt( DWT_INT_RFCG | (DWT_INT_ARFE | DWT_INT_RFSL | DWT_INT_SFDT | DWT_INT_RPHE | DWT_INT_RFCE | DWT_INT_RFTO | DWT_INT_RXPTO), 1); -- Gitblit v1.9.3