Commit 6abf17448fce9b70e4b11772ff335ea8700fcd8f
1 parent
5caab734
fix:document & closure
Showing
3 changed files
with
11 additions
and
11 deletions
HDFwear/20240110ReadMe.md
@@ -81,6 +81,10 @@ BluetoothManager+Function | @@ -81,6 +81,10 @@ BluetoothManager+Function | ||
81 | func newSetMessageRemind(enable: Bool, system: Bool, wechat: Bool, qq: Bool, completion: ((_ error: Int?) -> ())? = nil) | 81 | func newSetMessageRemind(enable: Bool, system: Bool, wechat: Bool, qq: Bool, completion: ((_ error: Int?) -> ())? = nil) |
82 | 发送: [237, 126, 0, 1, 0, 53, 0, 1, 0, 1, 3, 244, 72] | 82 | 发送: [237, 126, 0, 1, 0, 53, 0, 1, 0, 1, 3, 244, 72] |
83 | 接收: [237, 126, 0, 1, 128, 1, 0, 1, 0, 5, 0, 1, 0, 53, 0, 12, 19] | 83 | 接收: [237, 126, 0, 1, 128, 1, 0, 1, 0, 5, 0, 1, 0, 53, 0, 12, 19] |
84 | + | ||
85 | +设置低电提醒 | ||
86 | + func newSetLowPowerRemind(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) | ||
87 | + 发送: [237, 126, 0, 1, 0, 21, 0, 1, 0, 1, 1, 225, 2] | ||
84 | 88 | ||
85 | 接受数据类 | 89 | 接受数据类 |
86 | 遥控拍照 | 90 | 遥控拍照 |
HDFwear/ReadMe.txt
@@ -25,10 +25,6 @@ BluetoothManager+Function | @@ -25,10 +25,6 @@ BluetoothManager+Function | ||
25 | 8. 设置触摸唤醒 | 25 | 8. 设置触摸唤醒 |
26 | func newSetTouchSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) | 26 | func newSetTouchSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) |
27 | 发送: [237, 126, 0, 1, 0, 20, 0, 1, 0, 1, 1, 164, 162] | 27 | 发送: [237, 126, 0, 1, 0, 20, 0, 1, 0, 1, 1, 164, 162] |
28 | - | ||
29 | -9. 设置低电提醒 | ||
30 | - func newSetLowPowerRemind(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) | ||
31 | - 发送: [237, 126, 0, 1, 0, 21, 0, 1, 0, 1, 1, 225, 2] | ||
32 | 28 | ||
33 | 12. 设置心率过高提醒 | 29 | 12. 设置心率过高提醒 |
34 | func newSetHeartRateHighRemind(maxHr: UInt8, completion: ((_ error: Int?) -> ())? = nil) | 30 | func newSetHeartRateHighRemind(maxHr: UInt8, completion: ((_ error: Int?) -> ())? = nil) |
HDFwear/Tools/BluetoothManager+Function.swift
@@ -562,8 +562,8 @@ extension BluetoothManager { | @@ -562,8 +562,8 @@ extension BluetoothManager { | ||
562 | return | 562 | return |
563 | } | 563 | } |
564 | let newcmd = NewCmd(rawValue: bytes[13]) | 564 | let newcmd = NewCmd(rawValue: bytes[13]) |
565 | - switch newcmd { | ||
566 | - case .setTime, .setTimeFormat, .setTemperatureUnit, .setDistanceUnit, .setWristSense, .setTouchSense, .setLowPowerRemind, .setLanguage: | 565 | +// switch newcmd { |
566 | +// case .setTime, .setTimeFormat, .setTemperatureUnit, .setDistanceUnit, .setWristSense, .setTouchSense, .setLowPowerRemind, .setLanguage, .setHeartRateDetectInterval, .setPressureAutoDetect, .setBloodOxygenAutoDetect, .setUserInfo, .setNoDisturb, .setWeather, .setBeiDouContact, .setBeiDouQuickAnswer, .setRestHeartRateRemind, .setExerciseHeartRateRemind, .setBloodOxygenLowRemind, .setMessageRemind, .setFindWatch: | ||
567 | if setCmdClosure != nil { | 567 | if setCmdClosure != nil { |
568 | let success = bytes[14] == 0 | 568 | let success = bytes[14] == 0 |
569 | if success { | 569 | if success { |
@@ -573,11 +573,11 @@ extension BluetoothManager { | @@ -573,11 +573,11 @@ extension BluetoothManager { | ||
573 | } | 573 | } |
574 | setCmdClosure = nil | 574 | setCmdClosure = nil |
575 | } | 575 | } |
576 | - case .none: | ||
577 | - break | ||
578 | - default: | ||
579 | - break | ||
580 | - } | 576 | +// case .none: |
577 | +// break | ||
578 | +// default: | ||
579 | +// break | ||
580 | +// } | ||
581 | } | 581 | } |
582 | 582 | ||
583 | // 设备信息数据 | 583 | // 设备信息数据 |