From: hcj <1224667075@qq.com> Date: Thu, 31 Oct 2024 06:13:35 +0000 (+0800) Subject: 蓝牙上传tar文件位置修改 X-Git-Tag: fd230_release_V1.3.102~154 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=def01643e591eaa865009822090215c63007b095;p=mirrors%2FFD230.git 蓝牙上传tar文件位置修改 --- diff --git a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp index 4be97716d..67b085f2f 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -1071,29 +1071,7 @@ void install_Register_dial( char * name,uint16_t id) } - -#define CWM_HISTORY_DATA_PATH "/user/userdata/goal/step/step_" - -#define CWM_HISTORY_DATA_CALORIES_PATH "/user/userdata/goal/calories/calories_" - -#define CWM_HISTORY_DATA_DISTANCE_PATH "/user/userdata/goal/distance/distance_" - -#define CWM_HISTORY_STAND_DATA_PATH "/user/userdata/goal/stand/stand_" - -#define CWM_HISTORY_DATA_FAT_PATH "/user/userdata/goal/fat/fat_" - - -#define GOAL_DATA_CONFIG_DIR_STEP "/user/userdata/goal/step" - -#define GOAL_DATA_CONFIG_DIR_DISTANCE "/user/userdata/goal/distance" - -#define GOAL_DATA_CONFIG_DIR_STAND "/user/userdata/goal/stand" - -#define GOAL_DATA_CONFIG_DIR_FAT "/user/userdata/goal/fat" - -#define GOAL_DATA_CONFIG_DIR_CALORIES "/user/userdata/goal/calories" - - +#include "cywee_ble_Service.h" void delete_before_file(uint8_t type) { @@ -1706,7 +1684,8 @@ char * struct_to_json_buf_malloc_(uint8_t day) return NULL; #endif } -#define TAR_PATH "user/tar" + +#define TAR_PATH EXC_TAR_PATH static uint8_t Calculate_CRC_file(char *path)// diff --git a/code/sdk/drivers/peripheral/cywee/Inc/cywee_ble_Service.h b/code/sdk/drivers/peripheral/cywee/Inc/cywee_ble_Service.h index 28cd4405e..f72f69a63 100644 --- a/code/sdk/drivers/peripheral/cywee/Inc/cywee_ble_Service.h +++ b/code/sdk/drivers/peripheral/cywee/Inc/cywee_ble_Service.h @@ -11,6 +11,31 @@ #ifndef BLE_CYWEE_SERVER_H #define BLE_CYWEE_SERVER_H + +#define CWM_HISTORY_DATA_PATH "/user/userdata/goal/step/step_" + +#define CWM_HISTORY_DATA_CALORIES_PATH "/user/userdata/goal/calories/calories_" + +#define CWM_HISTORY_DATA_DISTANCE_PATH "/user/userdata/goal/distance/distance_" + +#define CWM_HISTORY_STAND_DATA_PATH "/user/userdata/goal/stand/stand_" + +#define CWM_HISTORY_DATA_FAT_PATH "/user/userdata/goal/fat/fat_" + +#define GOAL_DATA_CONFIG_DIR "/user/userdata/goal" + + +#define GOAL_DATA_CONFIG_DIR_STEP "/user/userdata/goal/step" + +#define GOAL_DATA_CONFIG_DIR_DISTANCE "/user/userdata/goal/distance" + +#define GOAL_DATA_CONFIG_DIR_STAND "/user/userdata/goal/stand" + +#define GOAL_DATA_CONFIG_DIR_FAT "/user/userdata/goal/fat" + +#define GOAL_DATA_CONFIG_DIR_CALORIES "/user/userdata/goal/calories" + + #include "errcode.h" #ifdef __cplusplus diff --git a/code/sdk/drivers/peripheral/cywee/src/board_yh601s.c b/code/sdk/drivers/peripheral/cywee/src/board_yh601s.c index 0520219b9..f62faa8cd 100644 --- a/code/sdk/drivers/peripheral/cywee/src/board_yh601s.c +++ b/code/sdk/drivers/peripheral/cywee/src/board_yh601s.c @@ -378,28 +378,7 @@ void CWM_OS_OneHourAgo_saveData(void* data, uint32_t len,uint8_t type){ -#define CWM_HISTORY_DATA_PATH "/user/userdata/goal/step/step_" -#define CWM_HISTORY_DATA_CALORIES_PATH "/user/userdata/goal/calories/calories_" - -#define CWM_HISTORY_DATA_DISTANCE_PATH "/user/userdata/goal/distance/distance_" - -#define CWM_HISTORY_STAND_DATA_PATH "/user/userdata/goal/stand/stand_" - -#define CWM_HISTORY_DATA_FAT_PATH "/user/userdata/goal/fat/fat_" - -#define GOAL_DATA_CONFIG_DIR "/user/userdata/goal" - - -#define GOAL_DATA_CONFIG_DIR_STEP "/user/userdata/goal/step" - -#define GOAL_DATA_CONFIG_DIR_DISTANCE "/user/userdata/goal/distance" - -#define GOAL_DATA_CONFIG_DIR_STAND "/user/userdata/goal/stand" - -#define GOAL_DATA_CONFIG_DIR_FAT "/user/userdata/goal/fat" - -#define GOAL_DATA_CONFIG_DIR_CALORIES "/user/userdata/goal/calories" void CWM_OS_saveData_history(void* new_data,void *history ,uint32_t len,uint8_t type){ diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index 93d337894..1efaacc24 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -1953,6 +1953,9 @@ void uapi_check_tar_file_count(char *folderpath) } #define MAX_TAR_READ_BUF 1024 + + + int uapi_tar_file(const char *src_path,const char *tar_path,char *tarfilename) { struct dirent *entry; @@ -2057,7 +2060,7 @@ int uapi_tar_file(const char *src_path,const char *tar_path,char *tarfilename) } else { - uapi_check_tar_file_count("/user/system/tar"); //有新的tar文件生成则检查tar文件数量 + uapi_check_tar_file_count(EXC_TAR_PATH); //有新的tar文件生成则检查tar文件数量 } free(buffer); return ret; @@ -2072,7 +2075,7 @@ int uapi_save_exc(void) char buildversion[64]={0}; uapi_get_buildversion((uint8_t*)&buildversion[0],sizeof(buildversion)); sprintf(str, tarfilePath,buildversion,timestamp); - return uapi_tar_file("/user/exc","/user/system/tar",str); + return uapi_tar_file("/user/exc",EXC_TAR_PATH,str); } void uapi_restore_factory_setting(void) diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.h b/code/sdk/drivers/peripheral/utils/custom_utils.h index aa299e62a..3fb2bdd72 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.h +++ b/code/sdk/drivers/peripheral/utils/custom_utils.h @@ -19,6 +19,8 @@ extern "C" { #include "thread_init.h" #include "pdu.h" +#define EXC_TAR_PATH "/user/system/tar" + #define TASK_PRIORITY_APP (osPriority_t)(17) #define TASK_PRIORITY_LOG (osPriority_t)(18) #define TASK_PRIORITY_CMD (osPriority_t)(17)