From 6d3e4db06a99004b13385a745813e3187490bb86 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Fri, 6 Jan 2023 17:56:19 +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 | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp index db62662..c007464 100644 --- a/code/base/test_base.cpp +++ b/code/base/test_base.cpp @@ -368,6 +368,7 @@ public: } else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0) { + if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0 || strcmp((char*)data, STATU_DESC_SCANNER_ERR_DEVICE_DISTORTION) == 0) { type = false; @@ -379,9 +380,9 @@ public: is_distortion_get_image = true; //type = true; //wcscpy(buf, L"畸变修正值获取完成:"); - break; + //break; } - + break; //ret = h->io_control(IO_CTRL_CODE_GET_DPI_COLOR_CHECK_VAL, &close, &closelen);//结束恢复默认 } else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY) == 0) @@ -495,7 +496,7 @@ public: { if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0) { - is_distortion_get_image = true; + //is_distortion_get_image = true; } h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_HAVE_IMAGE, data, true); } @@ -902,17 +903,15 @@ public: Sleep(1000); cnt++; } - is_distortion_get_image = false; if (val > 0) { float f = *(float*)&val; helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_DISTORTION_VAL, (void *)&f, true); } - //else - //{ - // helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT,(void*)L"自动计算畸变值获取失败", false); - //} - is_distortion_get_image = false; + else + { + helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_DISTORTION_VAL,(void*)L"自动计算畸变值获取失败", false); + } return ret; } int test_set_auto_distortion(void* data) @@ -1053,7 +1052,7 @@ DECL_API(int) func_test_go(const wchar_t* NAME, const wchar_t* oper, ui_helper* } //helper->add_ref(void *data); - + is_distortion_get_image = false; int ret = 0; SANE_Bool type = false; unsigned int len = sizeof(SANE_Bool);