Set smart heart rate mode
Function table
__IDO_FUNCTABLE__.funcTable37Model.smartHeartRate
Description of smart heart rate mode
- IDOSetSmartHeartRateModel
Parameter | Description | Remark |
---|---|---|
modeFlag | Smart Heart Rate Mode | bool yes is on no is off |
notifyFlag | Notification type | 0 Invalid ; 1:Allow notifications; 2:Silent notification; 3:Turn off notifications |
highHeartMode | Turn on the smart heart rate reminder switch | bool yes is on no is off |
lowHeartMode | Turn on the smart low heart rate reminder switch | bool yes is on no is off |
highHeartValue | Smart Heart Rate High Reminder Threshold | int |
lowHeartValue | Intelligent low Heart Rate Reminder Threshold | int |
Command code
Objc:
IDOSetSmartHeartRateModel * model = [IDOSetSmartHeartRateModel currentModel];
[IDOFoundationCommand setSmartHeartRateCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetSmartHeartRateModel.current();
IDOFoundationCommand.setSmartHeartRate(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};