修复切换表盘失败bug
authorliangzhenying <867174124@qq.com>
Fri, 26 Jul 2024 06:49:57 +0000 (14:49 +0800)
committerliangzhenying <867174124@qq.com>
Fri, 26 Jul 2024 06:49:57 +0000 (14:49 +0800)
Doc/【230】蓝牙手表通讯协议 7.25 .docx [new file with mode: 0644]
IOTBluetooth/IOTBluetooth/IOTBluetooth.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate
IOTBluetooth/IOTBluetooth/IOTBluetooth.xcodeproj/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
IOTBluetooth/IOTBluetooth/IOTBluetooth/IBManager.swift
IOTBluetooth/IOTBluetooth/IOTBluetooth/IBReceiveManager.swift
IOTBluetooth/IOTBluetooth/IOTBluetooth/IBluetooth.swift

diff --git a/Doc/【230】蓝牙手表通讯协议 7.25 .docx b/Doc/【230】蓝牙手表通讯协议 7.25 .docx
new file mode 100644 (file)
index 0000000..9684d12
Binary files /dev/null and "b/Doc/\343\200\220230\343\200\221\350\223\235\347\211\231\346\211\213\350\241\250\351\200\232\350\256\257\345\215\217\350\256\256 7.25 .docx" differ
index 693f765..650f5d2 100644 (file)
Binary files a/IOTBluetooth/IOTBluetooth/IOTBluetooth.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate and b/IOTBluetooth/IOTBluetooth/IOTBluetooth.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate differ
index baf400b..9cee688 100644 (file)
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C413F6E3-1C04-4AF4-8C3F-ACFF9BC5D55D"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "IOTBluetooth/IBParser.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "37"
+            endingLineNumber = "37"
+            landmarkName = "parse(_:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "BFA98FE5-6C90-482B-8631-D5DF531A83D3"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "IOTBluetooth/IBReceiveManager.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "48"
+            endingLineNumber = "48"
+            landmarkName = "receice(characteristic:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>
index a9b76da..91eeac4 100644 (file)
@@ -31,7 +31,7 @@ public class IBManager {
 
 public extension IBManager {
     /// SDK 版本号
-    static let version: String = "1.0.21"
+    static let version: String = "1.0.22"
     /// 默认为 false
     static var isDebug: Bool = false {
         didSet { Logger.isDebug = isDebug }
index fac1e0b..4c17cac 100644 (file)
@@ -18,6 +18,7 @@ class IBReceiveManager{
     static let shared = IBReceiveManager()
     
     var headData = Data()
+    var lastData = Data()
     var totalData = Data()
     
     
@@ -42,13 +43,14 @@ class IBReceiveManager{
 //                //ai语音
                 if pkgIndex == 1{
                     headData = data.prefix(17)
+                    lastData = data.suffix(1)
                 }
                 IBBluetooth.shared.deinitTimer()
                 IBBluetooth.shared.startTimer()
                 totalData = totalData + data.suffix(from: 17).prefix(pkgLen)
                 if pkgTotal == pkgIndex{
                     Logger.log("total = \(dataTotal),receive = \(totalData.count)")
-                    let fullData = headData + totalData
+                    let fullData = headData + totalData + lastData
                     didGetFullData(characteristic: characteristic, data: fullData)
                 }
 //            }
index d626767..02f9676 100644 (file)
@@ -242,7 +242,7 @@ extension IBBluetooth: CBCentralManagerDelegate {
             sender.remove()
         }
         
-        self.fileSender?.lastData?.fileWriteHander?(.response.code(.failure).message("手机未连上蓝牙设备"))
+        self.fileSender?.lastData?.fileWriteHander?(.response.code(.failure).message("蓝牙设备断开连接"))
         
         IBManager.completeHandler?(false)
         IBManager.completeHandler = nil