调整获取畸变值

This commit is contained in:
13038267101 2023-01-10 14:22:02 +08:00
parent 29da442fcf
commit da908bbf0b
1 changed files with 12 additions and 5 deletions

View File

@ -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); MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, s, len);
return 0; return 0;
} }
static int wchar_to_char(std::string &str, wchar_t* s, size_t* strlen) static int wchar_to_char(std::string &str, wchar_t* s, size_t* strlen)
{ {
if (!s) if (!s)
@ -913,9 +912,7 @@ public:
wchar_t* p = (wchar_t*)data; wchar_t* p = (wchar_t*)data;
std::string str; std::string str;
int ret = SCANNER_ERR_OK, int ret = SCANNER_ERR_OK,
val = 0,
dpi = 0; dpi = 0;
SANE_Bool type = true; SANE_Bool type = true;
unsigned int len = sizeof(SANE_Bool), unsigned int len = sizeof(SANE_Bool),
@ -997,7 +994,17 @@ public:
{ {
return ret; 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; return ret;
} }
/* 分纸强度检测 */ /* 分纸强度检测 */