Set the ambient volume switch

Function table

__IDO_FUNCTABLE__.funcTable37Model.syncNoise

Ambient Volume Switch Model Description

  • IDOSetV3NoiseSwitchModel
Parameter Description Remark
mode Switch bool
yes is on
no is off
startHour Start hour int
startMinute Start minute int
endHour Finish hour int
endMinute Finish minute int
highNoiseOnOff Threshold switch bool
yes is on
no is off
highNoiseValue Threshold int

Command code

Objc:

IDOSetV3NoiseSwitchModel * model = [IDOSetV3NoiseSwitchModel currentModel];
[IDOFoundationCommand setNoiseSwitchCommand:model
                                   callback:^(int errorCode) {
    if (errorCode == 0) {
       //Set successfully
    }else if (errorCode == 6) {
      //Device not supported
    }else {
      //Setup failed
    }
}];

Swift:

let model = IDOSetV3NoiseSwitchModel.current();
IDOFoundationCommand.setNoiseSwitch(model) { (errorCode) in
     if errorCode == 0 {
        //Set successfully
     }else if errorCode == 6{
        //Device does not support this method
     }else {
       //Wrong setting
     }
};
Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2023-12-18 10:04:13

results matching ""

    No results matching ""