From 581e8899937f59885357d309c8c75449fa5cf801 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Tue, 7 Mar 2023 16:44:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=95=B8=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/base/test_base.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp index 99fc885..1204d09 100644 --- a/code/base/test_base.cpp +++ b/code/base/test_base.cpp @@ -1022,7 +1022,12 @@ public: { ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &llen); } - + //先默认设置1 + float distortion = 1.0; + int setdistortion = *(int*)&distortion; + + ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_CHECK_VAL, &setdistortion, &len); + ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_IMAGE, &type, &len); if (ret != SCANNER_ERR_OK) { @@ -1107,10 +1112,6 @@ public: int setdistortion = *(int*)&distortion; int getdistortion = 0; - //先默认设置1 - int in = 1; - ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_CHECK_VAL, &in, &len); - ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_CHECK_VAL, &setdistortion, &len); if (ret != SCANNER_ERR_OK) {