From da908bbf0bf00e660f2997b7fc6b7278746ab020 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Tue, 10 Jan 2023 14:22:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=8E=B7=E5=8F=96=E7=95=B8?= =?UTF-8?q?=E5=8F=98=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/base/test_base.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp index c354759..028a618 100644 --- a/code/base/test_base.cpp +++ b/code/base/test_base.cpp @@ -76,7 +76,6 @@ static int str_to_wchar(std::string str, wchar_t* s, size_t* strlen) MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, s, len); return 0; } - static int wchar_to_char(std::string &str, wchar_t* s, size_t* strlen) { if (!s) @@ -913,9 +912,7 @@ public: wchar_t* p = (wchar_t*)data; std::string str; - - int ret = SCANNER_ERR_OK, - val = 0, + int ret = SCANNER_ERR_OK, dpi = 0; SANE_Bool type = true; unsigned int len = sizeof(SANE_Bool), @@ -997,7 +994,17 @@ public: { return ret; } - helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void *)L"设置畸变值完成", true); + + ret = helper_->io_control(IO_CTRL_CODE_GET_DISTORTION_DEVS_CHECK_VAL, &getdistortion, &len); + if (setdistortion == getdistortion) + { + helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"设置畸变值成功", true); + } + else + { + helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"设置畸变值失败", false); + } + return ret; } /* 分纸强度检测 */