controlRevisePoint method

Future<bool> controlRevisePoint(
  1. int x_percent,
  2. int y_percent, {
  3. int timeout = 5,
})

画面校正

Implementation

Future<bool> controlRevisePoint(int x_percent, int y_percent,
    {int timeout = 5}) async {
  bool ret = await _command.writeCgi(
      "camera_control.cgi?param=40&value=0&x_percent=${x_percent}&y_percent=${y_percent}");
  if (ret) {
    CommandResult result =
        await _command.waitCommandResult((int cmd, Uint8List data) {
      return cmd == 24594;
    }, timeout);
    if (result.isSuccess) {
      Map data = result.getMap();
      return data["result"] == "0";
    }
  }
  return false;
}