修复了AI登录失败bug
authorliangzhenying <867174124@qq.com>
Mon, 24 Feb 2025 05:47:16 +0000 (13:47 +0800)
committerliangzhenying <867174124@qq.com>
Mon, 24 Feb 2025 05:47:16 +0000 (13:47 +0800)
IOTBluetooth/IOTBluetooth/Example/Datas.swift
IOTBluetooth/IOTBluetooth/IOTBluetooth.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate
IOTBluetooth/IOTBluetooth/IOTBluetooth/IBReceiveManager.swift
IOTBluetooth/IOTBluetooth/IOTBluetooth/IBluetooth.swift

index 139e1bd..10563ad 100644 (file)
@@ -11,35 +11,35 @@ import IOTBluetooth
 
 
 let datas: [(ability: IBAbility, label: String, parameters: [IBParameter])] = [
-//    (.sendSchedule,"发送日程管理给手表",[.sendSchedule([IBSchedule()])]),
-//    (.getSosContact,"获取OS紧急联系人",[]),
-//    (.setSosContact,"设置SOS紧急联系人",[.setSosContact([IBContact()])]),
-//    
-//    (.getPushConfig,"获取推送配置",[]),
-//    (.setPushConfig,"设置推送",[.setPush(IBPush.all)]),
-//    
-//    (.getPasssword,"获取密码",[]),
-//    (.setPasssword,"启用密码",[.setPassword(IBPassword(type: 1, password: "123456"))]),
-//    (.setPasssword,"删除密码",[.setPassword(IBPassword(type: 0, password: ""))]),
-//    
-//    (.userData,"设置用户数据",[.userInfo(IBUserInfo())]),
-//    (.language, "设置语言", [.language(.chinese)]),
-//    (.about,"关于本机内容",[]),
-//    (.find, "开始查找手表", [.action(1)]),
-//    (.find, "停止查找手表", [.action(0)]),
-//    (.message, "开启消息推送功能", [.action(1)]),
-//    (.message, "关闭消息推送功能", [.action(0)]),
-//    
-//    (.takePhoto, "开启手势拍照", [.action(1)]),
-//    (.takePhoto, "关闭手势拍照", [.action(0)]),
-//    (.restore, "恢复出厂设置", []),
-//    (.reboot, "重新启动", []),
-//    (.shutdown, "关机", []),
-//    (.fetchScreen, "获取手表屏幕参数", []),
-//    (.screen, "设置手表屏幕参数", [.screen(Config.setScreen())]),
-//    (.fetchBattery, "获取电量", []),
-//    (.fetchClock, "获取闹钟设置", []),
-//    (.setClock, "发送闹钟设置", [.clock(IBClock())]),
+    (.sendSchedule,"发送日程管理给手表",[.sendSchedule([IBSchedule()])]),
+    (.getSosContact,"获取OS紧急联系人",[]),
+    (.setSosContact,"设置SOS紧急联系人",[.setSosContact([IBContact()])]),
+    
+    (.getPushConfig,"获取推送配置",[]),
+    (.setPushConfig,"设置推送",[.setPush(IBPush.all)]),
+    
+    (.getPasssword,"获取密码",[]),
+    (.setPasssword,"启用密码",[.setPassword(IBPassword(type: 1, password: "123456"))]),
+    (.setPasssword,"删除密码",[.setPassword(IBPassword(type: 0, password: ""))]),
+    
+    (.userData,"设置用户数据",[.userInfo(IBUserInfo())]),
+    (.language, "设置语言", [.language(.chinese)]),
+    (.about,"关于本机内容",[]),
+    (.find, "开始查找手表", [.action(1)]),
+    (.find, "停止查找手表", [.action(0)]),
+    (.message, "开启消息推送功能", [.action(1)]),
+    (.message, "关闭消息推送功能", [.action(0)]),
+    
+    (.takePhoto, "开启手势拍照", [.action(1)]),
+    (.takePhoto, "关闭手势拍照", [.action(0)]),
+    (.restore, "恢复出厂设置", []),
+    (.reboot, "重新启动", []),
+    (.shutdown, "关机", []),
+    (.fetchScreen, "获取手表屏幕参数", []),
+    (.screen, "设置手表屏幕参数", [.screen(Config.setScreen())]),
+    (.fetchBattery, "获取电量", []),
+    (.fetchClock, "获取闹钟设置", []),
+    (.setClock, "发送闹钟设置", [.clock(IBClock())]),
     
     (.fetchCurrentDialId, "发送当前表盘ID", []),
     (.switchDial, "切换表盘", [.dialID(120)]),
index a99126d..72f146b 100644 (file)
Binary files a/IOTBluetooth/IOTBluetooth/IOTBluetooth.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate and b/IOTBluetooth/IOTBluetooth/IOTBluetooth.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate differ
index 0e6ef0a..7c69522 100644 (file)
@@ -70,6 +70,7 @@ class IBReceiveManager {
             IBBluetooth.shared.currentConnected.productID = info.productID
             IBBluetooth.shared.currentConnected.customerID = info.customerID
             sendDeviceInfo()
+            IBAiManager.shared.login()
         }
 
         if IBNotify.handle(data) {
index de72d12..2a8535d 100644 (file)
@@ -212,8 +212,6 @@ extension IBBluetooth: CBCentralManagerDelegate {
 //        IBNotify.post(.connectedDeviceDidChange)
         Logger.log("已连接", currentConnected.name)
         IBNotify.post(.connectStateDidChange, object: 1)
-
-        IBAiManager.shared.login()
     }
     
     func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) {