From 6ca85aede70502640cfa53cdd9ba2935b1ec4759 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Wed, 16 Jul 2025 11:49:53 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E8=A1=80=E6=B0=A7=E6=A3=80?= =?utf8?q?=E6=B5=8B=E4=BD=A9=E6=88=B4=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) { -- 2.17.1