From 78bfd173f7dbbb8ea81ed618d4d74203b6259ced Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Thu, 12 Sep 2024 16:34:17 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD=E5=9B=A02ae?= =?utf8?q?2=20read=E5=80=BC=E6=9B=B4=E6=96=B0=E4=B8=8D=E5=8F=8A=E6=97=B6?= =?utf8?q?=EF=BC=8C=E5=AF=BC=E8=87=B4APP=E5=8F=AF=E8=83=BD=E6=97=A0?= =?utf8?q?=E6=B3=95=E5=8F=8A=E6=97=B6=E8=8E=B7=E5=8F=96=E5=88=B0=E6=9C=80?= =?utf8?q?=E6=96=B0=E8=A1=A8=E7=9B=98=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/service/ble_service/blemoder/bletest.cpp | 3 ++- .../wearable/service/ble_service/bleservice/bleService.c | 2 +- .../wearable/service/ble_service/bleservice/bleService.h | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp index 42c354438..c35eebef6 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -801,7 +801,8 @@ void ble_save_dial_custom(msg_recv_custom_dial_info_t *data) void ble_set_dial_by_id(uint16_t id) { #ifdef FD230 - return OHOS::SetDialModel::GetInstance().UpdateDialSetting(id); + OHOS::SetDialModel::GetInstance().UpdateDialSetting(id); + svr_ble_read_data_value_updata_noyify(); #endif } diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c index ff4f62cda..5386694ef 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c @@ -1154,7 +1154,7 @@ errcode_t svr_ble_read_data_value_updata_noyify(void)//2ae2 float voltage = 0.0F; uint8_t power = 0; power =battery_get_voltage(&voltage); - battery_point_val[0] +=1;//power ;//power;//电量90 + battery_point_val[0] =power;//power ;//power;//电量90 uint16_t dial = ble_get_dial_id(); memcpy_s(&battery_point_val[1],2,&dial,2); diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h index 8438e0476..0c45d557e 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h @@ -64,6 +64,8 @@ void br_adv_stop(void); void send_pair_succ(bd_addr_t *addr); +errcode_t svr_ble_read_data_value_updata_noyify(void); + #ifdef __cplusplus } #endif -- 2.17.1