From c5c600ff52a7aac7d387f684d741d8246d493e2d Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Mon, 18 Nov 2024 17:44:32 +0800 Subject: [PATCH] =?utf8?q?=E8=B0=83=E6=95=B4=E4=BD=A9=E6=88=B4=E6=A3=80?= =?utf8?q?=E6=B5=8B=E9=98=88=E5=80=BC=EF=BC=8C=E7=BC=A9=E7=9F=AD=E6=A3=80?= =?utf8?q?=E6=B5=8B=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c | 4 ++-- .../drivers/peripheral/ppg/hx3695/hx3695_check_touch.c | 10 ++++++---- .../drivers/peripheral/ppg/hx3695/tyhx_hrs_custom.h | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c index e670d4b96..7d5132efc 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c +++ b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c @@ -117,8 +117,8 @@ const int32_t spo2_ir_unwear_thres = 8000; //demo143b 25000 30000 const int32_t spo2_ir_wear_thres = 10000; const uint8_t spo2_ir_wear_offset = 15; //CHECK_WEAR_MODE_THRES -const int32_t check_mode_unwear_thre = 25000; -const int32_t check_mode_wear_thre = 30000; +const int32_t check_mode_unwear_thre = 20000; +const int32_t check_mode_wear_thre = 20000; uint8_t alg_ram[11 * 1024] __attribute__((aligned(4))); diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_check_touch.c b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_check_touch.c index 4bc19df23..5f41645a8 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_check_touch.c +++ b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_check_touch.c @@ -9,7 +9,7 @@ #include "hx3695.h" #include "hx3695_check_touch.h" #include "hx3695_hrs_agc.h" - +#include "cywee_hal.h" hx3695_wear_msg_code_t hx3695_wear_status = MSG_NO_WEAR; hx3695_wear_msg_code_t hx3695_wear_status_pre = MSG_NO_WEAR; @@ -179,8 +179,10 @@ hx3695_wear_msg_code_t hx3695_check_touch_send_data(int32_t *ir_data, uint8_t co hx3695_wear_msg_code_t check_touch_alg(int32_t ir_data) { ir_data = Ir_data; - // PRINT("ir_data : %d \r\n",ir_data); - if(ir_data > 80000) + // uint32_t tm; + // uapi_get_timestampe_ss(&tm); + // CWM_OS_dbgPrintf("ir_data : %d tm : %d\r\n",ir_data,tm); + if(ir_data > 60000) { touch_cnt = 0; if(notouch_cnt>=2) @@ -193,7 +195,7 @@ hx3695_wear_msg_code_t check_touch_alg(int32_t ir_data) notouch_cnt++; } } - else if(ir_data>check_mode_wear_thre && ir_data < 80000) + else if(ir_data>check_mode_wear_thre && ir_data < 60000) { notouch_cnt = 0; if(touch_cnt>=2) diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/tyhx_hrs_custom.h b/code/sdk/drivers/peripheral/ppg/hx3695/tyhx_hrs_custom.h index b9f6bbd63..d956bbd89 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/tyhx_hrs_custom.h +++ b/code/sdk/drivers/peripheral/ppg/hx3695/tyhx_hrs_custom.h @@ -8,7 +8,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2024-03-26 20:29:58 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2024-10-19 18:54:33 + * @LastEditTime: 2024-11-18 17:32:40 * @FilePath: /FD230/code/sdk/drivers/peripheral/ppg/hx3695/tyhx_hrs_custom.h * @Description: * @@ -77,7 +77,7 @@ uint32_t tyhx_read_regs( uint8_t reg_addr,uint8_t *readbuf,uint16_t readlen); #define TYHX_TIMER_40MS 40 #define TYHX_TIMER_320MS 320 -#define TYHX_TIMER_5000MS 1000 * 60 //纯佩戴修改为1分钟 优化小睡入睡时间计算 +#define TYHX_TIMER_5000MS 1000 * 5 //纯佩戴修改为1分钟 优化小睡入睡时间计算 //#define TYHX_TIMER_5000MS 5000 bool tyhx_timer_start(uint32_t ms); -- 2.17.1