From 1b0f7a23bc77131f011d0d5cf99e02afc0283cbb Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Fri, 23 Aug 2024 18:36:28 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?utf8?q?=E8=A1=A8=E7=9B=98=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/service/ble_service/bleservice/bleEvent.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c index 3a8993a71..eee2c06cd 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -164,7 +164,7 @@ static errcode_t get_file_recv_file_path(char* input_filename ,uint32_t input_si return ERRCODE_SUCC; } -static errcode_t get_custom_dial_file_path(uint16_t id,uint32_t input_size, char* output_file_path , uint32_t max_output_size) +static errcode_t get_custom_dial_file_path(uint16_t id,char *filename,uint32_t input_size, char* output_file_path , uint32_t max_output_size) { if( id >=5 || output_file_path == NULL) { @@ -173,7 +173,7 @@ static errcode_t get_custom_dial_file_path(uint16_t id,uint32_t input_size, char char name[64]={0}; ble_get_dial_path(name,id); - int ret = sprintf_s(output_file_path,max_output_size,"%s",name); + int ret = sprintf_s(output_file_path,max_output_size,"%s/%s.bin",name,filename); if (ret < 0) return ERRCODE_FAIL; @@ -6451,6 +6451,10 @@ errcode_t decode_single_dial_info(ble_read_data *buffer_handle) uapi_dev_runtime_set_dialname(filename); //存表盘id ble_dial_uid = dialinfo.dial_uid; + if(ble_dial_uid==0) + { + ble_dial_uid=1; + } buffer_handle->file_recv_stat.file_name = filename; @@ -6509,7 +6513,7 @@ static errcode_t install_dial(void) } else { - if (get_custom_dial_file_path(ble_dial_uid,strlen(dial_basename),dialbin_filepath,sizeof(dialbin_filepath)) != ERRCODE_SUCC) + if (get_custom_dial_file_path(ble_dial_uid,dial_basename,strlen(dial_basename),dialbin_filepath,sizeof(dialbin_filepath)) != ERRCODE_SUCC) { return ERRCODE_FAIL; } -- 2.17.1