From 85b7fcf139911137606a16888391dca85a6745cc 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: Fri, 24 Jan 2025 10:01:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/user_sys.h | 6 ++++-- bsp/src/bsp_nt26k.c | 8 ++++++-- rt-thread/rtconfig.h | 8 ++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/applications/user_sys.h b/applications/user_sys.h index 5a582a8..1643f8a 100644 --- a/applications/user_sys.h +++ b/applications/user_sys.h @@ -29,9 +29,11 @@ #define SYS_RELAY_SWITCH (0X04U) #define SYS_ALARM_VALVE_MAX (0X30U) -#define SYS_IOT_URL ("8.130.127.158") -#define SYS_IOT_PORT ("7101") +// #define SYS_IOT_URL ("8.130.127.158") +// #define SYS_IOT_PORT ("7101") +#define SYS_IOT_URL ("8.130.117.149") +#define SYS_IOT_PORT ("7137") // 定义宏来打印编译时间和日期 #define COMPILE_TIME \ do { \ diff --git a/bsp/src/bsp_nt26k.c b/bsp/src/bsp_nt26k.c index ec4efaa..e378e68 100644 --- a/bsp/src/bsp_nt26k.c +++ b/bsp/src/bsp_nt26k.c @@ -2,7 +2,7 @@ * @Author: mbw * @Date: 2024-10-09 08:42:14 * @LastEditors: mbw && 1600520629@qq.com - * @LastEditTime: 2025-01-24 08:43:53 + * @LastEditTime: 2025-01-24 09:59:17 * @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\bsp\src\bsp_nt26k.c * @Description: * @@ -178,6 +178,10 @@ void Nt26k_Send_Event(Nt26kEvent event_type) rt_event_send(&at_device_event, Nt26k_Get_Event_Flag(event_type)); } } + else + { + rt_event_send(&at_device_event, Nt26k_Get_Event_Flag(event_type)); + } } else { @@ -1118,7 +1122,7 @@ void Handle_Sever_Addr_Set(struct Nt26k_Ops *ops) else { LOG_D("服务器地址修改成功\n"); - if(ops->Resp(ops, DATA_SERIAL_NUM, CMD_TYPE_INSTRUCTION_REPLY, DEVICE_TYPE_NT26K, INSTRUCTION_DOWN_SEVER_ADDR, temp, RESPONSE_CODE_SUCCESS)==RT_EOK) + if(ops->Resp(ops, DATA_SERIAL_NUM, CMD_TYPE_INSTRUCTION_REPLY, DEVICE_TYPE_NT26K, INSTRUCTION_DOWN_SEVER_ADDR, temp, RESPONSE_CODE_SUCCESS) == RT_EOK) { Flash_Set_WorkDuration(work_duration); rt_thread_mdelay(100); diff --git a/rt-thread/rtconfig.h b/rt-thread/rtconfig.h index c0740bd..f2ff88b 100644 --- a/rt-thread/rtconfig.h +++ b/rt-thread/rtconfig.h @@ -15,8 +15,8 @@ /*使用动态日志及密码功能时,需开启宏 FINSH_USING_AUTH ULOG_USING_FILTER ENABLE_LOG_ALL ULOG_OUTPUT_LVL = 7 以及设置ulog.c 1522行 输出等级为0*/ /**/ -#define FINSH_USING_AUTH //开启终端密码登录功能 -#define ULOG_USING_FILTER //开启动态修改日志等级 默认修改在ulog.c 1522行 +// #define FINSH_USING_AUTH //开启终端密码登录功能 +// #define ULOG_USING_FILTER //开启动态修改日志等级 默认修改在ulog.c 1522行 #define ENABLE_LOG_ALL #define TEST_ENABLE //打开所有的终端测试程序 @@ -24,8 +24,8 @@ #define IOT_MODULE_SWITCH 1 //开启物联网功能 // #ifdef FINSH_USING_AUTH - // #define AT_USING_CLI - // #define AT_PRINT_RAW_CMD + #define AT_USING_CLI + #define AT_PRINT_RAW_CMD // #endif /* RT-Thread Kernel */