// if(uapi_dev_runtime_get_nap_monitoring_status() == 1)\r
// uapi_clean_sleep_flag(); // 清除睡眠标志文件\r
// OHOS::create_sleep_folder(); // 创建睡眠文件夹 \r
- set_keep_in_wear_det_mode(1); \r
+ set_keep_in_wear_det_mode(0); \r
do_cywee_service_check_msg(CYWEE_SERVICE_CMD_GET_SLEEP_DATA, &cmd); // 强制获取小睡数据,结束小睡\r
\r
// 睡眠弹窗\r
\r
//心率周期检测\r
void HandleHeartRateDetection(const struct tm *curTime) {\r
- int heartRateDetectionInterval =\r
- OHOS::ConfigModel::GetInstance()->get_configData_int(\r
- OHOS::ConfigModel::CONFIGMODEL_ITEM_HEARTRATE_DETECTED);\r
+ int heartRateDetectionInterval = 0;\r
+\r
+ if(uapi_dev_runtime_get_sleep_monitoring_status())\r
+ heartRateDetectionInterval = 10;\r
+ else\r
+ heartRateDetectionInterval = OHOS::ConfigModel::GetInstance()->get_configData_int(OHOS::ConfigModel::CONFIGMODEL_ITEM_HEARTRATE_DETECTED);\r
+ \r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Heart rate detection cycle detection is enabled %d",heartRateDetectionInterval);\r
if (heartRateDetectionInterval) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Heart rate detection cycle detection is enabled %d",curTime->tm_min % heartRateDetectionInterval);\r
}\r
}\r
//PRINT("hrsresult.wearstatus : %d , his_wear : %d , wear_cnt : %d \n",hrsresult.wearstatus,his_wear,wear_cnt);\r
- //PRINT("hrsresult.wearstatus : %d , cywee_wear_status : %d , hr_living : %d \n",hrsresult.wearstatus,cywee_wear_status,hrsresult.hr_living);\r
+ PRINT("hrsresult.wearstatus : %d , cywee_wear_status : %d , hr_living : %d \n",hrsresult.wearstatus,cywee_wear_status,hrsresult.hr_living);\r
// if(hrs_wear_status == MSG_HRS_WEAR && hrsresult.hr_living == MSG_LIVING_TRUE)\r
// {\r
// if(hrsresult.lastesthrs > 30 && hrsresult.lastesthrs < 220)\r
* @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:
*
{
#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)
{