From: hcj <1224667075@qq.com> Date: Mon, 26 Aug 2024 11:52:39 +0000 (+0800) Subject: 获取表盘id修改 X-Git-Tag: release_V1.2.70_20241020_135402~583^2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F794%2Fhead;p=mirrors%2FFD230.git 获取表盘id修改 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp index caf65d91f..15f835f24 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp @@ -186,7 +186,12 @@ namespace OHOS int length = 0; for (const auto &entry : registeredDials) { - memcpy_s(allidStr + length, 512, &entry.first, 2); + uint16_t id=entry.first; + if(id<=5) + { + id--; + } + memcpy_s(allidStr + length, 512, &id, 2); length += 2; } 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 81dc5c9a9..25dce2b94 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -698,7 +698,14 @@ void ble_get_custom_dial(uint16_t id,char *buf) uint16_t ble_get_dial_id(void) { #ifdef FD230 - return OHOS::SetDialModel::GetInstance().GetCurrentDialID(); + + + uint16_t id= OHOS::SetDialModel::GetInstance().GetCurrentDialID(); + if(id<=5) + { + id--; + } + return id; #else return 0; #endif