From ce7d72ba840e54cc5c2019b52ca2bac9b6b42fd3 Mon Sep 17 00:00:00 2001 From: timekeeper <1624952103@qq.com> Date: Fri, 15 Mar 2024 18:04:50 +0800 Subject: [PATCH] =?utf8?q?=E7=81=B0=E5=8D=A1=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp b/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp index 9eaacc743..d484249a8 100644 --- a/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp +++ b/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp @@ -47,6 +47,8 @@ extern "C" { static bool g_ppg_service_initialled = false; +uint8_t databuf[64] = {0}; + /*** * 其他cmd在Header里定义,对外开放 */ @@ -110,6 +112,7 @@ void CustomEventPublish(uint16_t topic, uint8_t *data , uint32_t size) errcode_t update_graycard_event_notify(uint8_t *data) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "send carddata to ui %s",data); CustomEventPublish(TOPIC_EVENT_GRAYCARD_UPDATA,(uint8_t*)&data,sizeof(data)); return 0; } @@ -165,7 +168,6 @@ errcode_t update_wearstatus_event_sendmsg_toUI(int32_t wearstatus) void hx3695_msg_callback(uint8_t msg_type, uint8_t *msg_data, int32_t msg_datalen) { - uint8_t databuf[64] = {0}; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hx3695_msg_callback"); FT_CUSTOM_RESULTS_t sensor_data; // 使用更通用的名称 sensor_data #if 1 @@ -198,6 +200,7 @@ void hx3695_msg_callback(uint8_t msg_type, uint8_t *msg_data, int32_t msg_datale // update_spo2_event_sendmsg_toUI(sensor_data.leak_ir); break; case HX3695_MSG_TYPE_GRAYCARD_UPDATE: + memset_s(databuf,64,0,64); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GRAYCARD_UPDATE"); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HX3695_MSG_TYPE_card_green_UPDATE = %d", sensor_data.card_green); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HX3695_MSG_TYPE_card_red_UPDATE = %d", sensor_data.card_red); -- 2.17.1