Merge #3082 into fd272 from refs/changes/3082/head 3090/target/1 3091/target/1
author彭磊 <1624952103@qq.com>
Wed, 14 Jan 2026 11:56:15 +0000 (11:56 +0000)
committer袁清梦 <3449750381@qq.com>
Wed, 14 Jan 2026 11:56:15 +0000 (11:56 +0000)
回退睡眠修改

* refs/changes/3082/head: (6 commits squashed)

  - 回退睡眠修改

  - 修复老化死机

  - 优化老化死机,优化表冠初始化

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

  - 优化老化死机,优化表冠初始化(补)

  - 测功耗指令关闭充电功能

Signed-off-by: aliyun6865282430 <1624952103@qq.com>
Merged-by: Caisking <3449750381@qq.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/3082
code/sdk/zhihui/UI/producttest/src/testView.cpp
code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c
code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c
code/sdk/zhihui/drivers/rotary_encoder/hx3508/hx3508.c
code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_def.h
code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.c
code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.h
code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp
code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c

index 56aff6e..ace8d03 100644 (file)
@@ -89,7 +89,7 @@ namespace OHOS
     testView::~testView()
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "testView::~testView");
-        ClearAll();
+        // ClearAll();
         g_pSystemView = nullptr;
     }
 
@@ -100,130 +100,126 @@ namespace OHOS
 
     void testView::ClearAll()
     {
-        if (group)
-        {
+        // 1. 释放group和关联的SystemScrollView[TESTVIEW]
+        if (group) {
             group->RemoveAll();
             delete group;
             group = nullptr;
-            if (SystemScrollView[TESTVIEW])
-            {
-                SystemScrollView[TESTVIEW]->RemoveAll();
-                delete SystemScrollView[TESTVIEW];
-                SystemScrollView[TESTVIEW] = nullptr;
-                delete SystemLabel;
-                SystemLabel = nullptr;
-                int funcSize = sizeof(Test_ViewMapper_t) / sizeof(Test_ViewMapper_t[TESTVIEW]);
-                for (int i = 0; i < funcSize; i++)
-                {
-                    if (button[i])
-                    {
+        }
+
+        // 2. 释放SystemScrollView[TESTVIEW](独立分支,避免依赖group)
+        if (SystemScrollView[TESTVIEW]) {
+            SystemScrollView[TESTVIEW]->RemoveAll();
+            delete SystemScrollView[TESTVIEW];
+            SystemScrollView[TESTVIEW] = nullptr;
+        }
+
+        // 3. 释放SystemLabel(独立判空,避免内存泄漏)
+        if (SystemLabel) {
+            delete SystemLabel;
+            SystemLabel = nullptr;
+        }
+
+        // 4. 释放button数组(独立释放,不依赖任何分支)
+        if (button != nullptr) { // 先检查数组本身是否有效
+            int funcSize = sizeof(Test_ViewMapper_t) / sizeof(Test_ViewMapper_t[TESTVIEW]);
+            // 防御性检查:避免funcSize为0或超出button数组长度
+            if (funcSize > 0 && funcSize <= 30) {
+                for (int i = 0; i < funcSize; i++) {
+                    if (button[i]) {
                         delete button[i];
-                        button[i] = NULL;
+                        button[i] = nullptr; // 统一用nullptr
                     }
                 }
             }
         }
-        if (test_about_view)
-        {
-            delete test_about_view; // 1
+
+        // 5. 释放各类视图对象(按"从子到父"顺序,统一判空,规范写法)
+        if (test_about_view) {
+            delete test_about_view;
             test_about_view = nullptr;
         }
-
-        if (test_LCD_view)
-        {
-            delete test_LCD_view; // 2
+        if (test_LCD_view) {
+            delete test_LCD_view;
             test_LCD_view = nullptr;
         }
-        if (test_TP_view)
-        {
-            delete test_TP_view; // 3
+        if (test_TP_view) {
+            delete test_TP_view;
             test_TP_view = nullptr;
         }
-        if (test_lum_view)
-        {
-            delete test_lum_view; // 4
+        if (test_lum_view) {
+            delete test_lum_view;
             test_lum_view = nullptr;
         }
-        if (test_charging_view)
-        {
-            delete test_charging_view; // 5
+        if (test_charging_view) {
+            delete test_charging_view;
             test_charging_view = nullptr;
         }
-        if (test_speak_view)
-        {
-            delete test_speak_view; // 6
+        if (test_speak_view) {
+            delete test_speak_view;
             test_speak_view = nullptr;
         }
-        if (test_motor_view)
-        {
-            delete test_motor_view; // 7
+        if (test_motor_view) {
+            delete test_motor_view;
             test_motor_view = nullptr;
         }
-#ifdef SUPPORT_CAT1_SERVICE
-        if (test_cat1_view)
-        {
-            delete test_cat1_view; // 8
+    #ifdef SUPPORT_CAT1_SERVICE
+        if (test_cat1_view) {
+            delete test_cat1_view;
             test_cat1_view = nullptr;
         }
-#endif
-
-        if (test_KEY_view)
-        {
-            delete test_KEY_view; // 9
+    #endif
+        if (test_KEY_view) {
+            delete test_KEY_view;
             test_KEY_view = nullptr;
         }
-        if (test_MG_view)
-        {
-            delete test_MG_view; // 10
+        if (test_MG_view) {
+            delete test_MG_view;
             test_MG_view = nullptr;
         }
-        if (test_hr_view)
-        {
-            delete test_hr_view; // 11
+        if (test_hr_view) {
+            delete test_hr_view;
             test_hr_view = nullptr;
         }
-        if (test_MP_view)
-        {
-            delete test_MP_view; // 12
+        if (test_MP_view) {
+            delete test_MP_view;
             test_MP_view = nullptr;
         }
-        if (test_G_view)
-        {
-            delete test_G_view; // 13
+        if (test_G_view) {
+            delete test_G_view;
             test_G_view = nullptr;
         }
-#ifdef SUPPORT_A5133_SERVICE
-        if (test_A5133_view)
-        {
-            delete test_A5133_view; // 13
+    #ifdef SUPPORT_A5133_SERVICE
+        if (test_A5133_view) {
+            delete test_A5133_view;
             test_A5133_view = nullptr;
         }
-#endif
-        // delete test_G_view;//13
-        // test_G_view= nullptr;
-
-        for (int i = 1; i < 13; i++)
-        {
-            if (SystemScrollView[i])
-                SystemScrollView[i] = nullptr;
-        }
-        if (test_Ping_view)
-        {
-            delete test_Ping_view; // PingTest
+    #endif
+        if (test_Ping_view) {
+            delete test_Ping_view;
             test_Ping_view = nullptr;
         }
-        if (test_QRCode_view)
-        {
-            delete test_QRCode_view; // QRCode
+        if (test_QRCode_view) {
+            delete test_QRCode_view;
             test_QRCode_view = nullptr;
         }
-#ifdef SUPPORT_GNSS
-        if (test_GPS_view)
-        {
-            delete test_GPS_view; // GPS
+    #ifdef SUPPORT_GNSS
+        if (test_GPS_view) {
+            delete test_GPS_view;
             test_GPS_view = nullptr;
         }
-#endif
+    #endif
+
+        // 6. 释放SystemScrollView数组其他元素(先释放内存,再置空)
+        if (SystemScrollView != nullptr) {
+            for (int i = 1; i < 30; i++) {
+                if (SystemScrollView[i]) {
+                    SystemScrollView[i]->RemoveAll(); // 先清理内部资源
+                    delete SystemScrollView[i];       // 释放内存
+                    SystemScrollView[i] = nullptr;    // 置空避免野指针
+                }
+            }
+        }
     }
 
     /// @brief 设置SystemScrollView
@@ -898,11 +894,19 @@ namespace OHOS
     // 4.切换视图
     void testView::ChangeView(int16_t hideView, int16_t showView)
     {
-        if (hideView > MAX_TESTVIEWID)
+        // 1. 修复:增加hideView下限检查(杜绝负数越界),同时检查showView合法性
+        if (hideView < 0 || hideView > MAX_TESTVIEWID)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: hideView(%d) Overstep ones bounds [0, %d]", hideView, MAX_TESTVIEWID);
+            return;
+        }
+        // 新增:检查showView越界,避免ClickFunc/SetVisible越界
+        if (showView < 0 || showView > MAX_TESTVIEWID)
         {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: SystemViewId Overstep ones bounds");
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: showView(%d) Overstep ones bounds [0, %d]", showView, MAX_TESTVIEWID);
             return;
         }
+
         if (SystemScrollView[hideView] != nullptr)
         {
             SystemScrollView[hideView]->SetVisible(false);
@@ -911,7 +915,9 @@ namespace OHOS
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: SystemScrollView[%d] is nullptr", hideView);
         }
+
         ClickFunc(showView);
+
         if (SystemScrollView[showView] != nullptr)
         {
             SystemScrollView[showView]->SetVisible(true);
@@ -920,147 +926,169 @@ namespace OHOS
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: SystemScrollView[%d] is nullptr", showView);
         }
+
         if (hideView != 0)
         {
+            // 2. 修复:核心防死机 - 检查group是否为空(避免group->Remove()空指针崩溃)
+            if (group == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: group is nullptr, skip remove/delete");
+                return;
+            }
+
             switch (hideView)
             {
             case QRCODE:
-                group->Remove(SystemScrollView[hideView]);
+                // 3. 修复:Remove前检查SystemScrollView[hideView]是否为空
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_QRCode_view;
                 test_QRCode_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case VISON:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_about_view;
                 test_about_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case LCD:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_LCD_view;
                 test_LCD_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case TP:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_TP_view;
                 test_TP_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-#ifdef SUPPORT_MAG_SERVICE
+    #ifdef SUPPORT_MAG_SERVICE
             case MAGETIC:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_MG_view;
                 test_MG_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-#endif
+    #endif
             case LUMINANCE:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_lum_view;
                 test_lum_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case CHARG:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_charging_view;
                 test_charging_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-
             case SPEAK:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_speak_view;
                 test_speak_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case MOTOR:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_motor_view;
                 test_motor_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-#ifdef SUPPORT_CAT1_SERVICE
+    #ifdef SUPPORT_CAT1_SERVICE
             case CAT1:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_cat1_view;
                 test_cat1_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-#endif
+    #endif
             case BUTTON:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_KEY_view;
                 test_KEY_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case MICROPHONE:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_MP_view;
                 test_MP_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case HRSENSON:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_hr_view;
                 test_hr_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case GSENSON:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_G_view;
                 test_G_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case OLDTEST:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_old_view;
                 test_old_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case BTTEST:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_BT_view;
                 test_BT_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
             case SEChipTest:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_SEChip_view;
                 test_SEChip_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-            // case PingTest:
-            //     group->Remove(SystemScrollView[hideView]);
-            //     delete test_Ping_view;
-            //     test_Ping_view = nullptr;
-            //     SystemScrollView[hideView] = nullptr;
-            //     break;
-#if defined(SUPPORT_GNSS)
+    #if defined(SUPPORT_GNSS)
             case GPSTEST:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_GPS_view;
                 test_GPS_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-#endif
-#ifdef SUPPORT_A5133_SERVICE
+    #endif
+    #ifdef SUPPORT_A5133_SERVICE
             case RF5133:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_A5133_view;
                 test_A5133_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-#endif
-#if defined(ENABLE_LQBP002TA)
+    #endif
+    #if defined(ENABLE_LQBP002TA)
             case PRESSURETEST:
-                group->Remove(SystemScrollView[hideView]);
+                if (SystemScrollView[hideView] != nullptr)
+                    group->Remove(SystemScrollView[hideView]);
                 delete test_pressure_view;
                 test_pressure_view = nullptr;
                 SystemScrollView[hideView] = nullptr;
                 break;
-#endif
+    #endif
             default:
                 break;
             }
index 7bc7cc4..adc8a6f 100644 (file)
@@ -1149,19 +1149,19 @@ void cywee_wearstatus_update(int wearstatus)
                 cywee_inactivity_mode_change(INACTIVITY_MODE_SEDENTARY_AND_NAP);
             }
         }
-        else if(uapi_dev_runtime_get_sleep_monitoring_status())
-        {
-            if(uapi_dev_runtime_get_sleep_status())
-            {
-                uapi_dev_runtime_set_absolute_static_status(1);
-                cywee_get_sleep_data(1);
-            }
-            else
-            {
-                cywee_inactivity_mode_change(INACTIVITY_MODE_NOTHING);
-                cywee_inactivity_mode_change(INACTIVITY_MODE_SLEEPING);
-            }
-        }
+        // else if(uapi_dev_runtime_get_sleep_monitoring_status())
+        // {
+        //     if(uapi_dev_runtime_get_sleep_status())
+        //     {
+        //         uapi_dev_runtime_set_absolute_static_status(1);
+        //         cywee_get_sleep_data(1);
+        //     }
+        //     else
+        //     {
+        //         cywee_inactivity_mode_change(INACTIVITY_MODE_NOTHING);
+        //         cywee_inactivity_mode_change(INACTIVITY_MODE_SLEEPING);
+        //     }
+        // }
 
         wearstatus = 0;
     }
index f9ecbbd..f30fe86 100644 (file)
@@ -1448,7 +1448,7 @@ void hx3695_alg_send_data(ppg_sensor_data_t *ppg_sensor_dat, WORK_MODE_T mode, u
                 else if(hrs_result.living_status == MSG_LIVING_FAIL)\r
                 {\r
                     living_wear_cnt++;\r
-                    if(living_wear_cnt >= 3)\r
+                    if(living_wear_cnt >= 5)\r
                     {\r
                         avg_hrs = 0;\r
                         living_status = 2;\r
index 74cce43..7c5f084 100644 (file)
@@ -27,6 +27,7 @@
 #include "hal_gpio.h"
 #include "pinctrl_porting.h"
 #include "hx3508_hal.h"
+#include "custom_runtime.h"
 // #include "tyhx_hrs_custom.h"
 //平台头文件包含定义
 #ifdef NORDIC_SDK
@@ -161,7 +162,8 @@ void hx3508_get_sum_y(float *data)
 void ots_timer_creat(void)
 {
     // app_timer_create(&g_hx3508_timer, APP_TIMER_MODE_REPEATED, ots_timer_handler);
-    g_hx3508_timer = osTimerNew((osTimerFunc_t)ots_timer_handler, osTimerPeriodic, NULL, NULL);
+    if(g_hx3508_timer == NULL)
+        g_hx3508_timer = osTimerNew((osTimerFunc_t)ots_timer_handler, osTimerPeriodic, NULL, NULL);
 }
 
 /**
@@ -589,7 +591,7 @@ void ots_data_handler(void *p_event_data, uint16_t event_size)
     }
     else
     {  
-        if(!factory_flag)
+        if(!factory_flag || !uapi_dev_runtime_get_factory_test_status_flag())
         {
             timer_cnt++;
             if (timer_cnt >= 200)  // 20*10 = // 200ms:200ms内sensor没有检测到表冠转动就会关闭定时器重新开启中断响应
@@ -715,8 +717,8 @@ void crown_com_resync(void)
 */
 void ots_init(void)
 {
-    if(ost_init == 1)
-        return;
+    // if(ost_init == 1)
+    //     return;
 
     ost_init = 1;
     //此时要保证芯片已经正常上电
@@ -799,10 +801,10 @@ void hx3508l_calibration(void)
 */
 void ots_start(void)
 {
-    if(ost_start_flag == 1)
-        return;
+    // if(ost_start_flag == 1)
+    //     return;
 
-    ost_start_flag = 1;
+    // ost_start_flag = 1;
     //bool ret = true;
        ots_write_reg(RA_DEBUG_CAS0,0x43);
        LOS_Mdelay(2); //delay about 1ms
@@ -872,10 +874,10 @@ void ots_start(void)
 */
 void ots_stop(void)
 {
-    if(ost_start_flag == 0)
-        return;
+    // if(ost_start_flag == 0)
+    //     return;
 
-    ost_start_flag = 0;
+    // ost_start_flag = 0;
 
 #ifdef MOT_NO_USE_MODE
        ots_timer_stop();
index 773755e..dbe1e9e 100644 (file)
@@ -48,12 +48,12 @@ extern "C" {
 
 #define re_err(x, ...) \
     do { \
-        PRINT("[ERROR]%s(%d): "x"\r\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); \
+        PRINT("[ERROR]%s(%d): " x "\r\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); \
     } while (0)
 
 #define re_warning(x, ...) \
     do { \
-        PRINT("[WARNING]%s(%d): "x"\r\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); \
+        PRINT("[WARNING]%s(%d): " x "\r\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); \
     } while (0)
 
 
index 61e6d85..eb2140b 100644 (file)
@@ -526,4 +526,17 @@ void rotary_get_chip_id(uint16_t *id)
 #elif defined ROTARYENCODER_HX3508
         hx3508_get_chip_id(id);
 #endif
+}
+
+uint8_t rotary_get_stand_still(void)
+{
+    uint8_t stand_still = 1;
+#ifdef ROTARYENCODER_HX3507
+    stand_still = hx3507_get_stand_still();
+#elif defined ROTARYENCODER_MIXO
+    stand_still = mixo_get_stand_still();
+#elif defined ROTARYENCODER_HX3508
+    stand_still = hx3508_get_stand_still();
+#endif
+    return stand_still;
 }
\ No newline at end of file
index ef038ee..8784292 100644 (file)
@@ -48,5 +48,6 @@ ext_errno rotary_encoder_module_init(void);
 ext_errno rotary_encoder_module_deinit(void);
 ext_errno encoder_info_process(void);
 void rotary_get_chip_id(uint16_t *id);
+uint8_t rotary_get_stand_still(void);
 
 #endif
\ No newline at end of file
index 3cef6ac..698f26e 100644 (file)
@@ -41,9 +41,8 @@ extern "C" {
 #include "custom_save_runtime.h"
 #include "input_app.h"
 
-#ifdef ROTARYENCODER_HX3508
-#include "hx3508.h"
-#endif
+#include "rotary_encoder_drv.h"
+
 
 void custom_VibratorFunc_int(int vibratorType)
 {
@@ -208,12 +207,12 @@ static void vibrator_service_check_task(void  *arg)
                 break;
 
             case 1:
-            #ifdef ROTARYENCODER_HX3508
-                if(hx3508_get_stand_still())
+
+                if(rotary_get_stand_still())
                 {
                     break;
                 }
-            #endif
+
                 g_VibratorFunc( mail.duty ,  mail.cycle_time_ms, mail.duration_time_ms);
                 break;
 
index 1c3da75..93cb048 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: penglei 1624952103@qq.com\r
  * @Date: 2024-06-17 14:31:08\r
  * @LastEditors: penglei 1624952103@qq.com\r
- * @LastEditTime: 2026-01-05 09:44:21\r
+ * @LastEditTime: 2026-01-14 14:51:22\r
  * @FilePath: /FD230/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c\r
  * @Description: \r
  * \r
@@ -1027,6 +1027,7 @@ void factorytest_protocol_common_decode(uint8_t submode,uint8_t testitem,uint8_t
 \r
 #ifdef ENABLE_HP4570\r
                 hp4570_set_batfet_dis(true);\r
+                hp4570_set_ceb_en(false);\r
 #endif\r
 \r
                 factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_COMMON,\r