From be232e54c5d0c3f4dfb27bd65de2cd49494d3981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=A9=AC=5F666?= <13089258+pony-six-hundred-and-sixty-six@user.noreply.gitee.com> Date: Tue, 6 May 2025 19:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98=EF=BC=8C=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E6=94=B9=E4=BA=868%LEL=EF=BC=8C=E5=93=8D=E5=BA=94=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=BC=A9=E7=9F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 +++- applications/user_sys.h | 2 +- bsp/inc/bsp_h308.h | 4 ++-- bsp/src/at_device_nt26k.c | 3 ++- packages/FlexibleButton-2.0.1/flexible_button.h | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index fba611a..f6d6147 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -74,7 +74,9 @@ "netdev.h": "c", "at.h": "c", "spi-bit-ops.h": "c", - "signal.h": "c" + "signal.h": "c", + "stdint.h": "c", + "xtr1common": "c" }, "commentTranslate.multiLineMerge": true, "C_Cpp.errorSquiggles": "disabled" diff --git a/applications/user_sys.h b/applications/user_sys.h index cab2d1a..b2d8d8a 100644 --- a/applications/user_sys.h +++ b/applications/user_sys.h @@ -24,7 +24,7 @@ #define SYS_IOT_UPLOAD_CYCLE_MIN (0X3C00U) // 高位在后,低位在前 #define SYS_IOT_RETRY (0X03U) #define SYS_TEMP_ALARM_THRESHOLD (0X30U) -#define SYS_ALARM_VALVE (0X0AU) +#define SYS_ALARM_VALVE (0X08U) #define SYS_EMV_SWITCH (0X04U) #define SYS_RELAY_SWITCH (0X04U) #define SYS_ALARM_VALVE_MAX (0X30U) diff --git a/bsp/inc/bsp_h308.h b/bsp/inc/bsp_h308.h index 7c0cc42..21ef9e0 100644 --- a/bsp/inc/bsp_h308.h +++ b/bsp/inc/bsp_h308.h @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2025-01-24 08:40:39 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-02-14 11:06:11 + * @LastEditTime: 2025-05-06 18:21:54 * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\bsp\inc\bsp_h308.h * @Description: * @ @@ -27,7 +27,7 @@ #define TSET_BSP_H308 -#define H308_SAMPLING_TIMS (8U) +#define H308_SAMPLING_TIMS (1U) /*浓度异常采样周期*/ #define H308_SAMPLING_ABNORMAL (60U) #define H308_PWR_PIN GET_PIN(B, 9) diff --git a/bsp/src/at_device_nt26k.c b/bsp/src/at_device_nt26k.c index 82743ff..40feb79 100644 --- a/bsp/src/at_device_nt26k.c +++ b/bsp/src/at_device_nt26k.c @@ -369,9 +369,10 @@ static int at_device_nt26k_connect_tcp(struct at_device *device) int at_send_data(struct at_device *device, const char *data, rt_size_t size) { -rt_mutex_take(nt26k_mutex, RT_WAITING_FOREVER); + #define NT26K_SEND_RESP_TIME (3000) + rt_mutex_take(nt26k_mutex, RT_WAITING_FOREVER); const char *line_buffer = RT_NULL; at_response_t resp = at_create_resp(AT_CLIENT_RECV_BUFF_LEN, 2, NT26K_SEND_RESP_TIME); if (resp == RT_NULL) diff --git a/packages/FlexibleButton-2.0.1/flexible_button.h b/packages/FlexibleButton-2.0.1/flexible_button.h index 2dabba6..3ebd82f 100644 --- a/packages/FlexibleButton-2.0.1/flexible_button.h +++ b/packages/FlexibleButton-2.0.1/flexible_button.h @@ -43,7 +43,7 @@ #include "stdint.h" -#define FLEX_BTN_SCAN_FREQ_HZ 20 // How often flex_button_scan () is called +#define FLEX_BTN_SCAN_FREQ_HZ 50 // How often flex_button_scan () is called #define FLEX_MS_TO_SCAN_CNT(ms) (ms / (1000 / FLEX_BTN_SCAN_FREQ_HZ)) // /* Multiple clicks interval, default 300ms */ #define MAX_MULTIPLE_CLICKS_INTERVAL (FLEX_MS_TO_SCAN_CNT(300))