Set the motion recognition switch
Function table
__IDO_FUNCTABLE__.funcTable23Model.activitySwitch
Motion Recognition Switch Model Description
- IDOSetActivitySwitchBluetoothModel
Parameter | Description | Remark |
---|---|---|
sportTypeOnOff | Automatic recognition of sports type switch | This parameter is deprecated |
sportRunOnOff | Automatic recognition of running switch | bool |
sportBicycleOnOff | Automatic recognition of bicycle switches | bool |
autoPauseOnOff | Motion automatic pause switch | bool |
endRemindOnOff | The end reminder switch | bool |
sportEllipticalOnOff | Automatic recognition of elliptical machine switch | bool |
sportRowingOnOff | Automatic recognition of rowing machine switches | bool |
sportSwimOnOff | Automatic recognition of swimming switch | bool |
Command code
Objc:
IDOSetActivitySwitchBluetoothModel * model = [IDOSetActivitySwitchBluetoothModel currentModel];
[IDOFoundationCommand setActivitySwitchCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetActivitySwitchBluetoothModel.current();
IDOFoundationCommand.setActivitySwitch(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};