From 9cd6ee5d15d9f6dad15da7e5d49b66d9430fcc56 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Fri, 30 Dec 2022 18:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E8=8A=82=E8=B5=9A=E7=BF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/base/test_base.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp index 6ce99a1..a976ed8 100644 --- a/code/base/test_base.cpp +++ b/code/base/test_base.cpp @@ -158,6 +158,30 @@ public: else type = true; } + else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PAPER_FEED) == 0) + { + if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0) + { + type = false; + wchar_t buf[128] = L"走纸检测失败,原因--->"; + wcscat(buf, wstr.c_str()); + wstr = buf; + } + else + type = true; + } + else if(wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD) == 0) + { + if (strcmp((char*)data, STATU_DESC_SCANNER_ERR_DEVICE_AUTO_FAIL_OVER) != 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); } @@ -171,8 +195,8 @@ public: { if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD) == 0) { - std::string str = StringToUtf((char*)data); - h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_FALT_INFO, (void*)&str[0], type); + //std::string str = StringToUtf((char*)data); + h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_FALT_INFO, (wchar_t*)wstr.c_str(), type); } } break;