蓝牙上传tar文件位置修改
authorhcj <1224667075@qq.com>
Thu, 31 Oct 2024 06:13:35 +0000 (14:13 +0800)
committerhcj <1224667075@qq.com>
Thu, 31 Oct 2024 06:13:35 +0000 (14:13 +0800)
code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp
code/sdk/drivers/peripheral/cywee/Inc/cywee_ble_Service.h
code/sdk/drivers/peripheral/cywee/src/board_yh601s.c
code/sdk/drivers/peripheral/utils/custom_utils.c
code/sdk/drivers/peripheral/utils/custom_utils.h

index 4be9771..67b085f 100644 (file)
@@ -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)//
index 28cd440..f72f69a 100644 (file)
 #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
index 0520219..f62faa8 100644 (file)
@@ -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){
index 93d3378..1efaacc 100644 (file)
@@ -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)
index aa299e6..3fb2bdd 100644 (file)
@@ -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)