Set heart rate mode
Function table
__IDO_FUNCTABLE__.funcTable4Model.heartRate
|| __IDO_FUNCTABLE__.funcTable22Model.v3HrData
v2 Heart Rate Mode Model Description
- IDOSetHrModeInfoBluetoothModel
Parameter | Description | Remark |
---|---|---|
modeType | Heart rate mode | 0:Turn off heart rate monitoring,1:Manual mode, 2:Automatic mode,3:Continuous monitoring |
isHasTimeRange | Is there a time gap | bool |
startHour | Start (Hour) | int |
startMinute | Start (Minute) | int |
endHour | Finish (hour) | int |
endMinute | Finish (Hour) | int |
measurementInterval | Measurement interval | Unit: minutes |
Command code
- Set v2 heart rate mode
Objc:
IDOSetHrModeInfoBluetoothModel * model = [IDOSetHrModeInfoBluetoothModel currentModel];
[IDOFoundationCommand setHrModeCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetHrModeInfoBluetoothModel.current();
IDOFoundationCommand.setHrMode(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};
v3 Heart Rate Mode Model Description
- IDOSetV3HeartRateModeBluetoothModel
Parameter | Description | Remark |
---|---|---|
modeType | Heart rate mode | Heart rate mode 0:Turn off heart rate monitoring(Invalid) 1:Manual mode (auto off) 2: Auto Mode (5 minutes) 3:Continuous monitoring (5 seconds)(Default: auto mode) 4:Default type (used by the first binding synchronization configuration, used by the C library) 5:Set the corresponding measurement interval(Set the corresponding measurement_interval)Select 4 and 5 mode, 2 and 3 modes are invalid 6:Intelligent heart rate mode (206 wal customization) |
updateTime | Timestamp | str |
isHasTimeRange | Is there a time gap | str |
startHour | Start (Hour) | int |
startMinute | Start (Minute) | int |
endHour | Finish (hour) | int |
endMinute | Finish (Minute) | int |
measurementInterval | Measurement interval | Unit: second, modeType ==5 is valid |
notifyFlag | Notification type | 0Invalid;1:Allow notifications; 2:Silent notification; 3:Turn off notifications (Need to support menu__ IDO_ FUNCTABLE__ FuncTable34Model. supportHrHighOrLowBtAlarm can only be configured with notifyFlag, highHeartMode, highHeartValue, lowHeartMode, and lowHeartValue) |
highHeartMode | Intelligent high heart rate reminder switch | bool |
lowHeartMode | Intelligent low heart rate reminder switch | bool |
highHeartValue | Smart Heart Rate High Alert Threshold | int |
lowHeartValue | Intelligent low heart rate reminder threshold | int |
Command code
- Set v3 heart rate mode
Objc:
IDOSetV3HeartRateModeBluetoothModel * model = [IDOSetV3HeartRateModeBluetoothModel currentModel];
[IDOFoundationCommand setV3HrModelCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetV3HeartRateModeBluetoothModel.current();
IDOFoundationCommand.setV3HrModel(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};