From: hcj <1224667075@qq.com> Date: Thu, 12 Sep 2024 08:34:17 +0000 (+0800) Subject: 修复可能因2ae2 read值更新不及时,导致APP可能无法及时获取到最新表盘 #28 X-Git-Tag: release_V1.2.70_20241020_135402~498 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F950%2F1;p=mirrors%2FFD230.git 修复可能因2ae2 read值更新不及时,导致APP可能无法及时获取到最新表盘 #28 --- 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