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