From: penglei <1624952103@qq.com> Date: Tue, 19 Mar 2024 12:18:31 +0000 (+0800) Subject: 灰卡漏光测试修改 X-Git-Tag: release_V1.2.70_20241020_135402~1274^2~3 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=7377da65c35d6a6cd297bbde1f46a2cf1a1e4ab9;p=mirrors%2FFD230.git 灰卡漏光测试修改 --- diff --git a/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp b/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp index 3416de6e3..9523add8e 100644 --- a/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp +++ b/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp @@ -72,7 +72,6 @@ void CustomEventPublish(uint16_t topic, uint8_t *data , uint32_t size) Request *request = NULL; BroadcastApi *broadcastApi = NULL; IUnknown *api = NULL; - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ChargerEventPublish topic=%u!!", topic); /* alloc request */ @@ -113,7 +112,7 @@ void CustomEventPublish(uint16_t topic, uint8_t *data , uint32_t size) errcode_t update_leaklight_event_notify(uint8_t *data) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "send lightdata to ui %s",data); - CustomEventPublish(TOPIC_EVENT_LEAKLIGHT_UPDATA,(uint8_t*)&data,sizeof(data)); + CustomEventPublish(TOPIC_EVENT_LEAKLIGHT_UPDATA,(uint8_t*)data,strlen((char*)data)); return 0; } errcode_t update_leaklight_event_sendmsg_toUI(uint8_t *data) @@ -128,7 +127,7 @@ errcode_t update_leaklight_event_sendmsg_toUI(uint8_t *data) 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)); + CustomEventPublish(TOPIC_EVENT_GRAYCARD_UPDATA,(uint8_t*)data,strlen((char*)data)); return 0; } errcode_t update_graycard_event_sendmsg_toUI(uint8_t *data) diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.h b/code/sdk/drivers/peripheral/utils/custom_utils.h index b9f1546af..395a06b7f 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.h +++ b/code/sdk/drivers/peripheral/utils/custom_utils.h @@ -6,8 +6,8 @@ * History: \n * 2023-02-24, Create file. \n */ -#ifndef BUTTON_H -#define BUTTON_H +#ifndef CUSTOM_UTILS_H +#define CUSTOM_UTILS_H #include "hal_gpio.h" #include "soc_osal.h"