diff --git a/HDFwear/20240110ReadMe.md b/HDFwear/20240110ReadMe.md index 3ae5eee..9c892c6 100644 --- a/HDFwear/20240110ReadMe.md +++ b/HDFwear/20240110ReadMe.md @@ -5,4 +5,17 @@ some APIs have been done before, go through and check them, update some API refe 接口实现 BluetoothManager+Function - +设置时间格式 + func newSetTimeFormat(format: TimeFormat, completion: ((_ error: Int?) -> ())? = nil) + 发送: [237, 126, 0, 1, 0, 16, 0, 1, 0, 1, 1, 162, 3] + 接收: [237, 126, 0, 1, 128, 1, 0, 29, 0, 5, 0, 1, 0, 16, 0, 217, 3] + +设置公英制 + func newSetDistanceUnit(unit: DistanceUnit, completion: ((_ error: Int?) -> ())? = nil) + 发送: [237, 126, 0, 1, 0, 18, 0, 1, 0, 1, 1, 41, 67] + 接收: [237, 126, 0, 1, 128, 1, 0, 30, 0, 5, 0, 1, 0, 18, 0, 119, 20] + +设置抬腕唤醒 + func newSetWristSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) + 发送: [237, 126, 0, 1, 0, 19, 0, 1, 0, 1, 0, 124, 194] + 接收: [237, 126, 0, 1, 128, 1, 0, 32, 0, 5, 0, 1, 0, 19, 0, 156, 232] diff --git a/HDFwear/ReadMe.txt b/HDFwear/ReadMe.txt index df29097..dd90481 100644 --- a/HDFwear/ReadMe.txt +++ b/HDFwear/ReadMe.txt @@ -17,25 +17,10 @@ BluetoothManager+Function 发送: [237, 126, 0, 1, 0, 9, 0, 1, 0, 6, 23, 7, 1, 17, 3, 38, 32, 36] 接收: [237, 126, 0, 1, 128, 1, 0, 14, 0, 5, 0, 1, 0, 9, 0, 149, 41] -4. 设置时间格式 - func newSetTimeFormat(format: TimeFormat, completion: ((_ error: Int?) -> ())? = nil) - 发送: [237, 126, 0, 1, 0, 16, 0, 1, 0, 1, 1, 162, 3] - 接收: [237, 126, 0, 1, 128, 1, 0, 29, 0, 5, 0, 1, 0, 16, 0, 217, 3] - 5. 设置温度单位 func newSetTemperatureUnit(unit: TemperatureUnit, completion: ((_ error: Int?) -> ())? = nil) 发送: [237, 126, 0, 1, 0, 17, 0, 1, 0, 1, 1, 231, 163] 接收: [237, 126, 0, 1, 128, 1, 0, 31, 0, 5, 0, 1, 0, 17, 0, 101, 148] - -6. 设置公英制 - func newSetDistanceUnit(unit: DistanceUnit, completion: ((_ error: Int?) -> ())? = nil) - 发送: [237, 126, 0, 1, 0, 18, 0, 1, 0, 1, 1, 41, 67] - 接收: [237, 126, 0, 1, 128, 1, 0, 30, 0, 5, 0, 1, 0, 18, 0, 119, 20] - -7. 设置抬腕唤醒 - func newSetWristSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) - 发送: [237, 126, 0, 1, 0, 19, 0, 1, 0, 1, 0, 124, 194] - 接收: [237, 126, 0, 1, 128, 1, 0, 32, 0, 5, 0, 1, 0, 19, 0, 156, 232] 8. 设置触摸唤醒 func newSetTouchSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) diff --git a/HDFwear/Tools/Bluetooth+Types.swift b/HDFwear/Tools/Bluetooth+Types.swift index 72cf839..6211b24 100644 --- a/HDFwear/Tools/Bluetooth+Types.swift +++ b/HDFwear/Tools/Bluetooth+Types.swift @@ -55,16 +55,16 @@ public struct BLEConfig { enum DistanceUnit: UInt8 { - case foot = 1 - case meter = 0 + case meter = 1 + case foot = 0 } enum TemperatureUnit: UInt8 { case celsius = 0 case fahrenheit = 1 } enum TimeFormat: UInt8 { - case hour_24 = 0 - case hour_12 = 1 + case hour_12 = 0 + case hour_24 = 1 } enum BleCmd: UInt8 {