This commit is contained in:
yangjiaxuan 2022-12-30 14:40:01 +08:00
commit 506baa0171
1 changed files with 16 additions and 4 deletions

View File

@ -146,6 +146,18 @@ public:
else else
type = true; type = true;
} }
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_COVER_SENSOR) == 0)
{
if (strcmp((char*)data, STATU_DESC_SCANNER_ERR_DEVICE_COVER_OPENNED) != 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); h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)wstr.c_str(), type);
} }
@ -159,8 +171,8 @@ public:
{ {
if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD) == 0) if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD) == 0)
{ {
//std::string str = StringToUtf((char*)data); std::string str = StringToUtf((char*)data);
//h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_FALT_INFO, (void*)&str[0], type); h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_FALT_INFO, (void*)&str[0], type);
} }
} }
break; break;
@ -450,7 +462,7 @@ public:
/* 走纸检查 */ /* 走纸检查 */
int test_paper_feed(void *data) //使用单张扫描测试 int test_paper_feed(void *data) //使用单张扫描测试
{ {
return helper_->io_control(IO_CTRL_CODE_TEST_SINGLE, NULL, NULL); return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
} }
/* 开盖传感器检查 */ /* 开盖传感器检查 */
int test_cover_sensor(void *data) //端点返回 使用单张扫描测试 int test_cover_sensor(void *data) //端点返回 使用单张扫描测试
@ -595,7 +607,7 @@ public:
if (ret != SCANNER_ERR_OK) if (ret != SCANNER_ERR_OK)
return ret; return ret;
helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_DISTORTION, (void*)L"设备重启中,请观察设备是否重启", true); helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"设备重启中,请观察设备是否重启", true);
return ret; return ret;
} }
/* 扫描图像质量确认 */ /* 扫描图像质量确认 */