From fda4b8f72f282462e4e72aab8d4ff6328fa71e2b Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Wed, 31 Dec 2025 17:23:03 +0800 Subject: [PATCH] =?utf8?q?272=E5=A2=9E=E5=8A=A0=E5=BF=83=E7=8E=87=E5=B9=BF?= =?utf8?q?=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c | 22 ++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c index 24009f8ae..11ae050fb 100644 --- a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c +++ b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c @@ -31,10 +31,17 @@ #ifdef SUPPORT_CYWEE_SERVICE #include "cywee_hal.h" #include "cywee_service.h" +#endif + +#ifdef CUSTOM_UTILS #include "custom_utils.h" #include "custom_runtime.h" #endif +#ifdef SUPPORT_PPG_BLE_SERVICE +#include "ppgBleService.h" +#endif + #include "ppg_hal.h" uint8_t read_fifo_first_flg = 0; @@ -69,7 +76,7 @@ static int32_t hrs_data[7] = {0}; static uint8_t left = 0; static uint8_t right = 0; static uint8_t avg_hrs = 0; - +static uint8_t time_cnt = 0; // static uint8_t his_wear = 2; // static uint8_t wear_cnt = 0; @@ -1420,6 +1427,19 @@ void hx3695_alg_send_data(ppg_sensor_data_t *ppg_sensor_dat, WORK_MODE_T mode, u living_status = 0; } } + time_cnt++; + if(time_cnt >= 3) + { + time_cnt = 0; +#ifdef SUPPORT_PPG_BLE_SERVICE + if(uapi_dev_runtime_get_hrs_ble_status()) + { + uint8_t ble_data = (uint8_t)avg_hrs; + ble_ppgtest_server_send_input_report(&ble_data,1); + } +#endif + } + break; } -- 2.17.1