From 829cba9fdd80e9ba25c1550f1f4a1d0802265ad7 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Mon, 18 Nov 2024 18:15:17 +0800 Subject: [PATCH] =?utf8?q?=E7=9D=A1=E7=9C=A0=E4=BD=A9=E6=88=B4=E6=A3=80?= =?utf8?q?=E6=B5=8B=E6=94=B9=E4=B8=BA=E6=B4=BB=E4=BD=93=E6=A3=80=E6=B5=8B?= =?utf8?q?=EF=BC=8C=E9=A2=91=E7=8E=87=E4=B8=BA10=E5=88=86=E9=92=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../src/AlarmClockTimerConfig.cpp | 12 ++++++++---- code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c | 2 +- code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hal.c | 12 ++++++------ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp index 84e899579..66b90050d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -538,7 +538,7 @@ extern "C" // if(uapi_dev_runtime_get_nap_monitoring_status() == 1) // uapi_clean_sleep_flag(); // 清除睡眠标志文件 // OHOS::create_sleep_folder(); // 创建睡眠文件夹 - set_keep_in_wear_det_mode(1); + set_keep_in_wear_det_mode(0); do_cywee_service_check_msg(CYWEE_SERVICE_CMD_GET_SLEEP_DATA, &cmd); // 强制获取小睡数据,结束小睡 // 睡眠弹窗 @@ -597,9 +597,13 @@ extern "C" //心率周期检测 void HandleHeartRateDetection(const struct tm *curTime) { - int heartRateDetectionInterval = - OHOS::ConfigModel::GetInstance()->get_configData_int( - OHOS::ConfigModel::CONFIGMODEL_ITEM_HEARTRATE_DETECTED); + int heartRateDetectionInterval = 0; + + if(uapi_dev_runtime_get_sleep_monitoring_status()) + heartRateDetectionInterval = 10; + else + heartRateDetectionInterval = OHOS::ConfigModel::GetInstance()->get_configData_int(OHOS::ConfigModel::CONFIGMODEL_ITEM_HEARTRATE_DETECTED); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Heart rate detection cycle detection is enabled %d",heartRateDetectionInterval); if (heartRateDetectionInterval) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Heart rate detection cycle detection is enabled %d",curTime->tm_min % heartRateDetectionInterval); diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c index 7d5132efc..da04832f7 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c +++ b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c @@ -2983,7 +2983,7 @@ void hx3695_hrs_ppg_Int_handle(void) } } //PRINT("hrsresult.wearstatus : %d , his_wear : %d , wear_cnt : %d \n",hrsresult.wearstatus,his_wear,wear_cnt); - //PRINT("hrsresult.wearstatus : %d , cywee_wear_status : %d , hr_living : %d \n",hrsresult.wearstatus,cywee_wear_status,hrsresult.hr_living); + PRINT("hrsresult.wearstatus : %d , cywee_wear_status : %d , hr_living : %d \n",hrsresult.wearstatus,cywee_wear_status,hrsresult.hr_living); // if(hrs_wear_status == MSG_HRS_WEAR && hrsresult.hr_living == MSG_LIVING_TRUE) // { // if(hrsresult.lastesthrs > 30 && hrsresult.lastesthrs < 220) diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hal.c b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hal.c index 1adbe4893..82d728413 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hal.c +++ b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hal.c @@ -2,7 +2,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2024-03-13 15:08:38 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2024-11-14 17:09:10 + * @LastEditTime: 2024-11-18 18:04:37 * @FilePath: /FD230/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hal.c * @Description: * @@ -76,11 +76,11 @@ void ppg_send_cmd_to_driver(char* mode, uint8_t enable) { #ifdef HRS_ALG_LIB hx3695_hrs_disable(); - // if(uapi_dev_runtime_get_sleep_monitoring_status() && uapi_dev_runtime_get_hrs_passivity_flag())//处于睡眠监测 且在心率周期检测期间 上报活体佩戴 - // { - // hx3695_wearstatus_update(); - // uapi_dev_runtime_set_hrs_passivity(0);//清除被动检测runtime - // } + if(uapi_dev_runtime_get_sleep_monitoring_status() && uapi_dev_runtime_get_hrs_passivity_flag())//处于睡眠监测 且在心率周期检测期间 上报活体佩戴 + { + hx3695_wearstatus_update(); + uapi_dev_runtime_set_hrs_passivity(0);//清除被动检测runtime + } #endif }else if(md == HRV_MODE) { -- 2.17.1