From 106a22f94064c2fcc50aacb9f5b2b2150f845d43 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BD=AD=E7=A3=8A?= <1624952103@qq.com> Date: Wed, 14 Jan 2026 11:56:15 +0000 Subject: [PATCH] Merge #3082 into fd272 from refs/changes/3082/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 回退睡眠修改 * refs/changes/3082/head: (6 commits squashed) - 回退睡眠修改 - 修复老化死机 - 优化老化死机,优化表冠初始化 - Merge branch 'fd272' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into fd272 - 优化老化死机,优化表冠初始化(补) - 测功耗指令关闭充电功能 Signed-off-by: aliyun6865282430 <1624952103@qq.com> Merged-by: Caisking <3449750381@qq.com> CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/3082 --- .../zhihui/UI/producttest/src/testView.cpp | 272 ++++++++++-------- code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c | 26 +- code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c | 2 +- .../drivers/rotary_encoder/hx3508/hx3508.c | 22 +- .../rotary_encoder/rotary_encoder_def.h | 4 +- .../rotary_encoder/rotary_encoder_drv.c | 13 + .../rotary_encoder/rotary_encoder_drv.h | 1 + .../vibrator/service/vibrator_service.cpp | 11 +- .../factorytest_protocol.c | 3 +- 9 files changed, 199 insertions(+), 155 deletions(-) diff --git a/code/sdk/zhihui/UI/producttest/src/testView.cpp b/code/sdk/zhihui/UI/producttest/src/testView.cpp index 56aff6e48..ace8d0363 100644 --- a/code/sdk/zhihui/UI/producttest/src/testView.cpp +++ b/code/sdk/zhihui/UI/producttest/src/testView.cpp @@ -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; } diff --git a/code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c b/code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c index 7bc7cc44e..adc8a6fe0 100644 --- a/code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c +++ b/code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c @@ -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; } diff --git a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c index f9ecbbd32..f30fe8694 100644 --- a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c +++ b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c @@ -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) { living_wear_cnt++; - if(living_wear_cnt >= 3) + if(living_wear_cnt >= 5) { avg_hrs = 0; living_status = 2; diff --git a/code/sdk/zhihui/drivers/rotary_encoder/hx3508/hx3508.c b/code/sdk/zhihui/drivers/rotary_encoder/hx3508/hx3508.c index 74cce430f..7c5f08459 100644 --- a/code/sdk/zhihui/drivers/rotary_encoder/hx3508/hx3508.c +++ b/code/sdk/zhihui/drivers/rotary_encoder/hx3508/hx3508.c @@ -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(); diff --git a/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_def.h b/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_def.h index 773755e76..dbe1e9e33 100644 --- a/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_def.h +++ b/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_def.h @@ -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) diff --git a/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.c b/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.c index 61e6d855e..eb2140b47 100644 --- a/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.c +++ b/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.c @@ -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 diff --git a/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.h b/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.h index ef038ee49..878429233 100644 --- a/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.h +++ b/code/sdk/zhihui/drivers/rotary_encoder/rotary_encoder_drv.h @@ -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 diff --git a/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp b/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp index 3cef6ac75..698f26e74 100644 --- a/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp +++ b/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp @@ -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; diff --git a/code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c b/code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c index 1c3da759f..93cb048f9 100644 --- a/code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c +++ b/code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c @@ -2,7 +2,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2024-06-17 14:31:08 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2026-01-05 09:44:21 + * @LastEditTime: 2026-01-14 14:51:22 * @FilePath: /FD230/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c * @Description: * @@ -1027,6 +1027,7 @@ void factorytest_protocol_common_decode(uint8_t submode,uint8_t testitem,uint8_t #ifdef ENABLE_HP4570 hp4570_set_batfet_dis(true); + hp4570_set_ceb_en(false); #endif factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_COMMON, -- 2.17.1