Set the pressure switch
Function table
__IDO_FUNCTABLE__.funcTable20Model.pressureData
Description of pressure switch model
- IDOSetPressureSwitchBluetoothModel
Parameter | Description | Remark |
---|---|---|
onOff | Switch | bool |
startHour | Start (hour) | int |
startMinute | Start (minute) | int |
endHour | Finish (hour) | int |
endMinute | Finish (minute) | int |
remindOnOff | Stress reminder Switch | bool |
repeat | Repeat set | [Monday、Tuesday、Wednesday、Thursday、Friday、Saturday、Sunday] |
interval | Reminder interval | Unit minutes Default 60 minutes |
interval | Reminder interval | Unit minutes Default 60 minutes |
highThreshold | High pressure threshold | int |
notifyFlag | Notification type | 0 Invalid ; 1:Allow notifications; 2:Silent notification; 3:Turn off notifications funcTable35Model.pressureNotifyFlagMode Function table support is valid |
stressThreshold | Pressure threshold | int |
Command code
Objc:
IDOSetPressureSwitchBluetoothModel * model = [IDOSetPressureSwitchBluetoothModel currentModel];
[IDOFoundationCommand setPressureSwitchCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetPressureSwitchBluetoothModel.current();
IDOFoundationCommand.setPressureSwitch(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};