Commit 0a0892cc40d6a7d26030581119980ad3b04cdb68

Authored by daifengyi
1 parent 76bb5f50

fix:replace watch name to run the connection

HDFwear/Setting/CustomDialViewController.swift
... ... @@ -54,7 +54,7 @@ class CustomDialViewController: UIViewController, TZImagePickerControllerDelegat
54 54  
55 55 override func viewDidLoad() {
56 56 super.viewDidLoad()
57   -// if CurDevice.name.contains("Watch 7") {
  57 +// if CurDevice.name.contains("Watch 8") {
58 58 // dialWidth = 240
59 59 // dialHeight = 286
60 60 imageHeightLayout.constant = 180.0*CGFloat(dialHeight)/CGFloat(dialWidth)
... ...
HDFwear/Setting/FirmwareUpdateVC.swift
... ... @@ -59,7 +59,7 @@ class FirmwareUpdateVC: UIViewController, XMLParserDelegate {
59 59 UIApplication.shared.isIdleTimerDisabled = true
60 60 if device.name.contains("P8GT") {
61 61 deviceImageView.image = UIImage(named: "P8GT_icon")
62   - } else if device.name.contains("Watch 7") {
  62 + } else if device.name.contains("Watch 8") {
63 63 deviceImageView.image = UIImage(named: "Watch7_icon")
64 64 } else if device.name.contains("S7 NO.1") {
65 65 deviceImageView.image = UIImage(named: "S7_NO.1_icon")
... ...
HDFwear/Setting/SettingViewController.swift
... ... @@ -205,7 +205,7 @@ class SettingViewController: UIViewController, LBXScanViewControllerDelegate {
205 205 if curDevice.name.contains("P8GT") {
206 206 settingArray = [["遥控拍照", "查找手环", "提醒功能", "其他设置", "抬腕亮屏", "目标设置", "联系人"], ["固件升级", "删除设备", "后台保护"]]
207 207 watchImageView.image = UIImage(named: "P8GT_icon")
208   - } else if curDevice.name.contains("Watch 7") {
  208 + } else if curDevice.name.contains("Watch 8") {
209 209 watchImageView.image = UIImage(named: "Watch7_icon")
210 210 dialWidth = 240
211 211 dialHeight = 286
... ... @@ -222,7 +222,7 @@ class SettingViewController: UIViewController, LBXScanViewControllerDelegate {
222 222 } else {
223 223 watchImageView.image = UIImage(named: "bracelet_icon")
224 224 }
225   -// if curDevice.name.contains("Watch 7") {
  225 +// if curDevice.name.contains("Watch 8") {
226 226 //
227 227 // }
228 228  
... ... @@ -673,9 +673,9 @@ extension SettingViewController: UICollectionViewDelegate, UICollectionViewDataS
673 673 return
674 674 }
675 675  
676   - if showALert() {
677   - return
678   - }
  676 +// if showALert() {
  677 +// return
  678 +// }
679 679 MBProgressHUD.hide()
680 680  
681 681 switch settingText {
... ...
HDFwear/Setting/UnbindViewController.swift
... ... @@ -37,7 +37,7 @@ class UnbindViewController: UIViewController {
37 37  
38 38 if device.name.contains("P8GT") {
39 39 watchImageView.image = UIImage(named: "P8GT_icon")
40   - } else if device.name.contains("Watch 7") {
  40 + } else if device.name.contains("Watch 8") {
41 41 watchImageView.image = UIImage(named: "Watch7_icon")
42 42 } else if device.name.contains("S7 NO.1") {
43 43 watchImageView.image = UIImage(named: "S7_NO.1_icon")
... ...
HDFwear/Tools/BluetoothManager.swift
... ... @@ -225,7 +225,7 @@ class BluetoothManager: NSObject {
225 225 platform = ._816
226 226 } else if (name?.range(of: "MTB025B") != nil || name?.range(of: "MTB033B") != nil) {
227 227 platform = ._818
228   - } else if name?.range(of: "hq7") != nil || name?.range(of: "D09") != nil || name?.range(of: "P8GT") != nil || name?.range(of: "hq8") != nil || name?.range(of: "Watch 7") != nil || name?.range(of: "D07") != nil || name?.range(of: "S7 NO.1") != nil || name?.range(of: "G7 Pro Max Gameboy") != nil {
  228 + } else if name?.range(of: "hq7") != nil || name?.range(of: "D09") != nil || name?.range(of: "P8GT") != nil || name?.range(of: "hq8") != nil || name?.range(of: "Watch 8") != nil || name?.range(of: "D07") != nil || name?.range(of: "S7 NO.1") != nil || name?.range(of: "G7 Pro Max Gameboy") != nil {
229 229 platform = ._828
230 230 }
231 231 registerClientProfile()
... ... @@ -1688,7 +1688,7 @@ extension BluetoothManager: CBCentralManagerDelegate {
1688 1688 if peripheralDic.keys.contains(peripheral.identifier.uuidString) {
1689 1689 return
1690 1690 }
1691   - if peripheral.name?.range(of: "You 1_LE") != nil || peripheral.name?.range(of: "Pro_LE") != nil || peripheral.name?.range(of: "MTB025B") != nil || peripheral.name?.range(of: "MTB033B") != nil || peripheral.name?.range(of: "hq7") != nil || peripheral.name?.range(of: "D09") != nil || peripheral.name?.range(of: "P8GT") != nil || peripheral.name?.range(of: "hq8") != nil || peripheral.name?.range(of: "Watch 7") != nil || peripheral.name?.range(of: "D07") != nil || peripheral.name?.range(of: "S7 NO.1") != nil || peripheral.name?.range(of: "G7 Pro Max Gameboy") != nil {
  1691 + if peripheral.name?.range(of: "You 1_LE") != nil || peripheral.name?.range(of: "Pro_LE") != nil || peripheral.name?.range(of: "MTB025B") != nil || peripheral.name?.range(of: "MTB033B") != nil || peripheral.name?.range(of: "hq7") != nil || peripheral.name?.range(of: "D09") != nil || peripheral.name?.range(of: "P8GT") != nil || peripheral.name?.range(of: "hq8") != nil || peripheral.name?.range(of: "Watch 8") != nil || peripheral.name?.range(of: "D07") != nil || peripheral.name?.range(of: "S7 NO.1") != nil || peripheral.name?.range(of: "G7 Pro Max Gameboy") != nil {
1692 1692 peripheralDic[peripheral.identifier.uuidString] = peripheral
1693 1693 // print(peripheral.name)key String "kCBAdvDataServiceData"
1694 1694  
... ...