From 2ff76bee9c575b6247ded9d0769b001190680967 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Thu, 29 Dec 2022 18:30:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/base/test_base.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp index ca74aec..add1b3a 100644 --- a/code/base/test_base.cpp +++ b/code/base/test_base.cpp @@ -114,6 +114,18 @@ public: return 0; } } + else if(wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_ULTRASONIC_MODULE) == 0) + { + if (strcmp((char*)data, STATU_DESC_SCANNER_ERR_DEVICE_DOUBLE_FEEDING) != 0) + { + type = false; + wchar_t buf[128] = L"未检测到双张,原因--->"; + wcscat(buf, wstr.c_str()); + wstr = buf; + } + else + type = true; + } h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)wstr.c_str(), type); } break; @@ -619,7 +631,13 @@ public: power = (SANE_Power)i; } } - return helper_->io_control(IO_CTRL_CODE_SET_POWER_LEVEL, &power, &len); + int ret = helper_->io_control(IO_CTRL_CODE_SET_POWER_LEVEL, &power, &len); + if (ret != SCANNER_ERR_OK) + { + return ret; + } + ret = helper_->io_control(IO_CTRL_CODE_SET_POWER_LEVEL, &power, &len); + return ret; return SCANNER_ERR_OK; } /* 歪斜挡位检测 */