获取表盘id修改 794/1 794/head 795/target/1
authorhcj <1224667075@qq.com>
Mon, 26 Aug 2024 11:52:39 +0000 (19:52 +0800)
committerhcj <1224667075@qq.com>
Mon, 26 Aug 2024 11:52:39 +0000 (19:52 +0800)
code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp
code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp

index caf65d9..15f835f 100644 (file)
@@ -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;
         }
 
index 81dc5c9..25dce2b 100644 (file)
@@ -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