From: penglei <1624952103@qq.com> Date: Wed, 16 Jul 2025 03:49:53 +0000 (+0800) Subject: 优化血氧检测佩戴获取 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~210^2~27 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1972%2F1;p=mirrors%2FFD230.git 优化血氧检测佩戴获取 --- diff --git a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c index ad7483d30..ef7619f77 100644 --- a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c +++ b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c @@ -3031,7 +3031,7 @@ void hx3695_hrs_ppg_Int_handle(void) // hrsresult.lastesthrs = 0; // } - // PRINT("hrs : %d , wear_status : %d \n",hrsresult.lastesthrs,hrsresult.wearstatus); + // PRINT("hrs : %d , wear_status : %d \n",hrsresult.lastesthrs,wear_status); hrs_result = hrsresult.lastesthrs; msg_count++; @@ -3484,6 +3484,18 @@ void hx3695_spo2_ppg_Int_handle(void) hrsresult.lastestspo2 = spo2_alg_results.spo2_result; hrsresult.lastesthrs = spo2_alg_results.hr_result; uint8_t curr_wear = 1; + + if(spo2_wear_status == MSG_SPO2_WEAR) + { + wear_status = 1; + } + else if(spo2_wear_status == MSG_SPO2_NO_WEAR || spo2_alg_results.spo2_living_status == MSG_SPO2_LIVING_FAIL) + { + wear_status = 0; + } + + // printf("spo2:%d wear:%d\n",spo2_alg_results.spo2_result,wear_status); + //uint8_t last_wear = cwm_get_wear_status(); if(spo2_wear_status == MSG_SPO2_WEAR && spo2_alg_results.spo2_living_status == MSG_SPO2_LIVING_TRUE) {