From: hcj <1224667075@qq.com> Date: Fri, 23 Aug 2024 10:36:28 +0000 (+0800) Subject: 修复自定义表盘下载问题 X-Git-Tag: release_V1.2.70_20241020_135402~596 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=1b0f7a23bc77131f011d0d5cf99e02afc0283cbb;p=mirrors%2FFD230.git 修复自定义表盘下载问题 --- 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; }