From 115c1f2b3fdb555fdc4e40ac4d6a060fc27f5748 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Tue, 28 Oct 2025 18:36:21 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96n9=E4=BD=A9=E6=88=B4=E6=A3=80?= =?utf8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../drivers/ppg/pah8009/sensor/pah800x_main.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/code/sdk/zhihui/drivers/ppg/pah8009/sensor/pah800x_main.c b/code/sdk/zhihui/drivers/ppg/pah8009/sensor/pah800x_main.c index 1396f08d3..460684492 100644 --- a/code/sdk/zhihui/drivers/ppg/pah8009/sensor/pah800x_main.c +++ b/code/sdk/zhihui/drivers/ppg/pah8009/sensor/pah800x_main.c @@ -148,15 +148,21 @@ static void pah8009_unwearstatus_update(void) static void pah8009_wearstatus_update(int wear_status) { + uint8_t max_wear_cnt = 50; + + if(work_mode == 3) + max_wear_cnt = 3; + if(history_wear_status != wear_status) { - if(uapi_dev_runtime_get_train_status()) - { + // if(uapi_dev_runtime_get_train_status()) + // { // printf("wear_cnt : %d\n",wear_cnt); wear_cnt++; - if(wear_cnt < 50) + + if(wear_cnt < max_wear_cnt) return; - } + // } wear_cnt = 0; history_wear_status = wear_status; #ifdef SUPPORT_CYWEE_SERVICE -- 2.17.1