Set up breathing exercises
Function table
__IDO_FUNCTABLE__.funcTable23Model.breatheTrain
Breathing training model description
- IDOSetBreatheTrainBluetoothModel
Parameter | Description | Remark |
---|---|---|
frequency | Breaths per minute | int |
Command code
Objc:
IDOSetBreatheTrainBluetoothModel * model = [IDOSetBreatheTrainBluetoothModel currentModel];
[IDOFoundationCommand setBreatheTrainCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetBreatheTrainBluetoothModel.current();
IDOFoundationCommand.setBreatheTrain(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};