Commit a96e872925e3be1d016c5a195c6a8cdf51d8cc3c
1 parent
79a9ca69
fix:api usage
Showing
1 changed file
with
7 additions
and
0 deletions
HDFwear/Tools/BluetoothManager+Function.swift
... | ... | @@ -58,6 +58,7 @@ extension BluetoothManager { |
58 | 58 | } |
59 | 59 | |
60 | 60 | // 设置抬腕唤醒 |
61 | + // bool 0表示关闭,1表示打开 | |
61 | 62 | func newSetWristSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) { |
62 | 63 | let data = BleMessage.shared.getWristSenseCmd(bool) |
63 | 64 | self.setCmdClosure = completion |
... | ... | @@ -65,6 +66,7 @@ extension BluetoothManager { |
65 | 66 | } |
66 | 67 | |
67 | 68 | // 设置触摸唤醒 |
69 | + // bool 0表示关闭,1表示打开 | |
68 | 70 | func newSetTouchSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) { |
69 | 71 | let data = BleMessage.shared.getTouchSenseCmd(bool) |
70 | 72 | self.setCmdClosure = completion |
... | ... | @@ -72,6 +74,7 @@ extension BluetoothManager { |
72 | 74 | } |
73 | 75 | |
74 | 76 | // 设置低电提醒 |
77 | + // bool 0表示关闭,1表示打开 | |
75 | 78 | func newSetLowPowerRemind(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) { |
76 | 79 | let data = BleMessage.shared.getLowPowerRemind(bool) |
77 | 80 | self.setCmdClosure = completion |
... | ... | @@ -134,6 +137,7 @@ extension BluetoothManager { |
134 | 137 | } |
135 | 138 | |
136 | 139 | // 设置用户信息 |
140 | + // user 使用UserInfoModel数据类型,该接口只支持身高、体重、性别的设置,对应是weight、height、gender | |
137 | 141 | func newSetUserInfo(_ user: UserInfoModel, completion: ((_ error: Int?) -> ())? = nil) { |
138 | 142 | let data = BleMessage.shared.getUserInfoCmd(user) |
139 | 143 | self.setCmdClosure = completion |
... | ... | @@ -141,6 +145,9 @@ extension BluetoothManager { |
141 | 145 | } |
142 | 146 | |
143 | 147 | // 设置勿扰模式 |
148 | + // remind 使用RemindModel数据类型,该接口使用到了isOn,startDate,endDate这三个字段, | |
149 | + // isRepeat 表示是否重复 | |
150 | + // weakflag 表示一周中的哪些天开启勿扰模式,例如周一和周五开启,那么就传入[.monday, .friday] | |
144 | 151 | func newSetNotDisturb(remind: RemindModel, weekflag:[WeekFlag], isRepeat:Bool, completion: @escaping(_ error: Int?) -> ()) { |
145 | 152 | let data = BleMessage.shared.getNotDisturbCmd(remind, weekflag: weekflag, isRepeat:isRepeat) |
146 | 153 | self.setCmdClosure = completion | ... | ... |