From 4baf35a6de7119c1ce8ef2c60ffcbda637c8d3fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=83=A1=E4=BC=A0=E5=86=9B?= <1224667075@qq.com> Date: Fri, 23 Aug 2024 10:49:17 +0000 Subject: [PATCH] Merge #778 into sdk602patch0626 from refs/changes/778/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 修复自定义表盘下载问题 * refs/changes/778/head: (1 commits squashed) - 修复自定义表盘下载问题 Signed-off-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/778 --- .../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