From a96e872925e3be1d016c5a195c6a8cdf51d8cc3c Mon Sep 17 00:00:00 2001 From: daifengyi Date: Mon, 3 Jul 2023 10:49:49 +0800 Subject: [PATCH] fix:api usage --- HDFwear/Tools/BluetoothManager+Function.swift | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/HDFwear/Tools/BluetoothManager+Function.swift b/HDFwear/Tools/BluetoothManager+Function.swift index b586c54..b3235ab 100644 --- a/HDFwear/Tools/BluetoothManager+Function.swift +++ b/HDFwear/Tools/BluetoothManager+Function.swift @@ -58,6 +58,7 @@ extension BluetoothManager { } // 设置抬腕唤醒 + // bool 0表示关闭,1表示打开 func newSetWristSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) { let data = BleMessage.shared.getWristSenseCmd(bool) self.setCmdClosure = completion @@ -65,6 +66,7 @@ extension BluetoothManager { } // 设置触摸唤醒 + // bool 0表示关闭,1表示打开 func newSetTouchSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) { let data = BleMessage.shared.getTouchSenseCmd(bool) self.setCmdClosure = completion @@ -72,6 +74,7 @@ extension BluetoothManager { } // 设置低电提醒 + // bool 0表示关闭,1表示打开 func newSetLowPowerRemind(bool: Bool, completion: ((_ error: Int?) -> ())? = nil) { let data = BleMessage.shared.getLowPowerRemind(bool) self.setCmdClosure = completion @@ -134,6 +137,7 @@ extension BluetoothManager { } // 设置用户信息 + // user 使用UserInfoModel数据类型,该接口只支持身高、体重、性别的设置,对应是weight、height、gender func newSetUserInfo(_ user: UserInfoModel, completion: ((_ error: Int?) -> ())? = nil) { let data = BleMessage.shared.getUserInfoCmd(user) self.setCmdClosure = completion @@ -141,6 +145,9 @@ extension BluetoothManager { } // 设置勿扰模式 + // remind 使用RemindModel数据类型,该接口使用到了isOn,startDate,endDate这三个字段, + // isRepeat 表示是否重复 + // weakflag 表示一周中的哪些天开启勿扰模式,例如周一和周五开启,那么就传入[.monday, .friday] func newSetNotDisturb(remind: RemindModel, weekflag:[WeekFlag], isRepeat:Bool, completion: @escaping(_ error: Int?) -> ()) { let data = BleMessage.shared.getNotDisturbCmd(remind, weekflag: weekflag, isRepeat:isRepeat) self.setCmdClosure = completion -- libgit2 0.21.4