changeVolume method

Future<bool> changeVolume(
  1. int param,
  2. int value, {
  3. int timeout = 5,
})

Implementation

Future<bool> changeVolume(int param, int value, {int timeout = 5}) async {
  if (value == null) {
    return false;
  }
  bool ret = await writeCgi("camera_control.cgi?param=$param&value=$value&");
  if (ret == true) {
    CommandResult result = await waitCommandResult((cmd, data) {
      return cmd == 24594;
    }, timeout);
    if (result.isSuccess) {
      lightMode = value;
    }
    return result.isSuccess;
  }
  return false;
}