Merge #1300 into sdk602patch0911 from refs/changes/1300/head
author胡传军 <1224667075@qq.com>
Thu, 31 Oct 2024 06:19:32 +0000 (06:19 +0000)
committer袁清梦 <3449750381@qq.com>
Thu, 31 Oct 2024 06:19:32 +0000 (06:19 +0000)
Code review from 胡传军

* refs/changes/1300/head: (4 commits squashed)

  - 修改SOS 8s触发为3s触发

  - Merge branch &#39;sdk602patch0911&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0911

  - 蓝牙上传tar文件位置修改

  - Merge branch &#39;sdk602patch0911&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0911

Signed-off-by: aliyun8003852482 <1224667075@qq.com>
Reviewed-by: Caisking <3449750381@qq.com>
Reviewed-by: 罗正 <1732036298@qq.com>
Reviewed-by: aliyun8003852482 <1224667075@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Reviewed-by: aliyun6865282430 <1624952103@qq.com>
Merged-by: Caisking <3449750381@qq.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1300
code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp
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 e42ec8f..94a3512 100644 (file)
@@ -290,7 +290,7 @@ namespace OHOS
     bool RebootAndShutdownModel::RegisterFuncKeyLongPressEvent(void)
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootAndShutdownModel::RegisterFuncKeyLongPressEvent");
-        int32_t ret = uapi_button_register_event_cb(SOSKeyLongPress, BUTTON1_LONGPRESS_8S);
+        int32_t ret = uapi_button_register_event_cb(SOSKeyLongPress, BUTTON1_LONGPRESS_3S);
         if (ret != ERRCODE_SUCC)
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Register PowerKey LongPress Event error, ret = %d", ret);
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)