From 489c01585a29eb24927f6c14ba1670de42bbd91e Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Thu, 8 Jan 2026 12:22:14 +0800 Subject: [PATCH] =?utf8?q?=E6=9B=B4=E6=96=B03695=E7=AE=97=E6=B3=95?= =?utf8?q?=E5=BA=93=EF=BC=8C=E4=BC=98=E5=8C=96=E5=BF=83=E7=8E=87=E8=AE=A1?= =?utf8?q?=E7=AE=97,=E5=85=B3=E9=97=ADgps=E6=97=A5=E5=BF=97=E6=89=93?= =?utf8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/drivers/ppg/ppgBleService/ppgBleService.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/sdk/zhihui/drivers/ppg/ppgBleService/ppgBleService.c b/code/sdk/zhihui/drivers/ppg/ppgBleService/ppgBleService.c index 6827728d3..a4d4cf657 100644 --- a/code/sdk/zhihui/drivers/ppg/ppgBleService/ppgBleService.c +++ b/code/sdk/zhihui/drivers/ppg/ppgBleService/ppgBleService.c @@ -114,13 +114,17 @@ errcode_t ble_ppgtest_server_send_input_report(const uint8_t *data, uint8_t len) // printf("ble_hid_server_send_input_report:%d %d %d",data[0],data[1],len); gatts_ntf_ind_t param = {0}; param.attr_handle = (uint16_t)g_ppgtest_notify_report_att_hdl; + // param.value_len = len; + // param.value = bt_os_new(len); param.value_len = len + 1; param.value = bt_os_new(param.value_len); if (param.value == NULL) { printf( "[ppgtest][ERROR]send input report new fail\r\n"); return ERRCODE_BT_MALLOC_FAIL; } - if (memcpy_s(param.value + 1, param.value_len, data, len) != EOK) { + // if (memcpy_s(param.value, param.value_len, data, len) != EOK) + if (memcpy_s(param.value + 1, param.value_len, data, len) != EOK) + { printf( "[ppgtest][ERROR]send input report memcpy fail\r\n"); bt_os_free(param.value); return ERRCODE_BT_FAIL; -- 2.17.1