From b502b505620c1d426692744d7fb5462c0539f802 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Sun, 1 Dec 2024 15:02:16 +0800 Subject: [PATCH] =?utf8?q?auto=5Fota=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/application/wearable/auto_ota/auto_ota_service.c | 4 ++-- code/sdk/drivers/peripheral/utils/custom_utils.c | 6 +++++- code/sdk/drivers/peripheral/utils/custom_utils_at_cmd.c | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/wearable/auto_ota/auto_ota_service.c b/code/sdk/application/wearable/auto_ota/auto_ota_service.c index c7c743c0e..0211fc95c 100644 --- a/code/sdk/application/wearable/auto_ota/auto_ota_service.c +++ b/code/sdk/application/wearable/auto_ota/auto_ota_service.c @@ -247,7 +247,7 @@ void AT_auto_ota_add_node_to_found_dev_list(uint8_t *char_addr) char buf[3]={0}; memcpy_s(buf,2,char_addr+y,2); y+=2; - bd_addr.addr[i]= (uint8_t)strtol(buf,NULL,16); + bd_addr.addr[5-i]= (uint8_t)strtol(buf,NULL,16); } int cod = gap_get_device_class(&bd_addr); @@ -652,7 +652,7 @@ void auto_ota_task_init(void) //100001061128 static uint8_t address_num=0; -char *ota_addrss[50]={0}; +char *ota_addrss[100]={0}; // char * str= "0f0001061128"; // "D60001061128","500001061128"}; diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index 670b02fa6..992bb120f 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -3923,7 +3923,11 @@ static bool g_enable_uart_rx = true; */ bool uapi_custom_uart_rx_enable_flag(void) { - return g_enable_uart_rx; + #ifdef SUPPORT_AUTO_OTA + return true; + #else + return g_enable_uart_rx; + #endif } diff --git a/code/sdk/drivers/peripheral/utils/custom_utils_at_cmd.c b/code/sdk/drivers/peripheral/utils/custom_utils_at_cmd.c index fdaf34e25..d36154488 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils_at_cmd.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils_at_cmd.c @@ -1402,7 +1402,9 @@ static uint32_t Add_need_addrss_atuoota(uint8_t *para, uint32_t paraLen, char *s } #ifdef SUPPORT_AUTO_OTA add_need_ota_addrss((char*)argv[0]); - wstp_print("Add_need_addrss_atuoota ok\n"); + wstp_print("Add_need_addrss_atuoota ok %s\n",(char*)argv[0]); + wstp_print("OK~\n"); + #endif return ERRCODE_SUCC; -- 2.17.1