设置智能心率模式
智能心率模式功能表
__IDO_FUNCTABLE__.funcTable37Model.smartHeartRate
智能心率模式模型说明
- IDOSetSmartHeartRateModel
参数 | 说明 | 备注 |
---|---|---|
modeFlag | 智能心率模式 | bool yes 为开 no 为关 |
notifyFlag | 通知类型 | 0无效 ; 1:允许通知; 2:静默通知; 3:关闭通知 |
highHeartMode | 开启智能心率过高提醒开关 | bool yes 为开 no 为关 |
lowHeartMode | 开启智能心率过低提醒开关 | bool yes 为开 no 为关 |
highHeartValue | 智能心率过高提醒阈值 | int |
lowHeartValue | 智能心率过低提醒阈值 | int |
命令代码
Objc:
IDOSetSmartHeartRateModel * model = [IDOSetSmartHeartRateModel currentModel];
[IDOFoundationCommand setSmartHeartRateCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//设置成功
}else if (errorCode == 6) {
//设备不支持
}else {
//设置失败
}
}];
Swift:
let model = IDOSetSmartHeartRateModel.current();
IDOFoundationCommand.setSmartHeartRate(model) { (errorCode) in
if errorCode == 0 {
//设置成功
}else if errorCode == 6{
//设备不支持此方法
}else {
//设置错误
}
};