畸变调整
This commit is contained in:
parent
7a783fda9a
commit
ea0c892b82
|
@ -81,12 +81,12 @@ public:
|
||||||
enum test_event
|
enum test_event
|
||||||
{
|
{
|
||||||
TEST_EVENT_TIPS = 0, // messages in testing process, data is (wchar_t*), flag is unused
|
TEST_EVENT_TIPS = 0, // messages in testing process, data is (wchar_t*), flag is unused
|
||||||
TEST_EVENT_xxx, // should be complemented ...
|
|
||||||
TEST_EVENT_NOT_FIND_TEST, // dll. not find test ,data is (wchar_t*)description, flag is (false)
|
TEST_EVENT_NOT_FIND_TEST, // dll. not find test ,data is (wchar_t*)description, flag is (false)
|
||||||
TEST_EVENT_IO_FAIL, // IO. err flag is SCANNER_ERR_DEVICE_NOT_SUPPORT or io err,data is null
|
TEST_EVENT_IO_FAIL, // IO. err flag is SCANNER_ERR_DEVICE_NOT_SUPPORT or io err,data is null
|
||||||
TEST_EVENT_MANUAL_CONFIRMATION, // After send cmd ,need manual confirmation.
|
TEST_EVENT_MANUAL_CONFIRMATION, // After send cmd ,need manual confirmation.
|
||||||
TEST_EVENT_RESULT, // test result, data is (wchar_t*)description, flag is (bool)result, true - test pass
|
TEST_EVENT_RESULT, // test result, data is (wchar_t*)description, flag is (bool)result, true - test pass
|
||||||
TEST_EVENT_HAVE_IMAGE // have image.
|
TEST_EVENT_HAVE_IMAGE, // have image.
|
||||||
|
TEST_EVENT_DISTORTION, // user set a single page,flag is int
|
||||||
};
|
};
|
||||||
virtual void test_callback(const wchar_t* name/*test name*/, test_event ev, void* data, size_t flag)=0 ;
|
virtual void test_callback(const wchar_t* name/*test name*/, test_event ev, void* data, size_t flag)=0 ;
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ public:
|
||||||
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_DISTORTION) == 0)
|
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_DISTORTION) == 0)
|
||||||
{
|
{
|
||||||
int ret = h->io_control(IO_CTRL_CODE_GET_DPI_COLOR_CHECK_VAL, &io_type, &io_len);
|
int ret = h->io_control(IO_CTRL_CODE_GET_DPI_COLOR_CHECK_VAL, &io_type, &io_len);
|
||||||
if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED))
|
if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) == 0)
|
||||||
{
|
{
|
||||||
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_DISTORTION, (void*)L"畸变修正完成,是否进行单页扫描测试", type);
|
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_DISTORTION, (void*)L"畸变修正完成,是否进行单页扫描测试", type);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -265,10 +265,15 @@ public:
|
||||||
SANE_Bool type = true;
|
SANE_Bool type = true;
|
||||||
unsigned int len = sizeof(SANE_Bool);
|
unsigned int len = sizeof(SANE_Bool);
|
||||||
int num = 0;
|
int num = 0;
|
||||||
parameter * ptr = helper_->get_user_input(ui_helper::DATA_FROM_USER, ui_helper::VAL_TYPE_INT, NAME,L"请设置阈值:1-5。默认:1");
|
|
||||||
|
parameter * ptr = helper_->get_user_input(ui_helper::DATA_FROM_USER, ui_helper::VAL_TYPE_INT, NAME,L"请歪斜放纸...设置阈值:1 - 5,值越小越容易检测");
|
||||||
if (ptr)
|
if (ptr)
|
||||||
num = *((int*)ptr->get_data());
|
num = *((int*)ptr->get_data());
|
||||||
|
if (num == -1)
|
||||||
|
{
|
||||||
|
helper_->test_callback((wchar_t*)data, ui_helper::TEST_EVENT_RESULT, (void*)L"已退出歪斜检测流程", false);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (num == 0)
|
if (num == 0)
|
||||||
num = 1;
|
num = 1;
|
||||||
|
|
||||||
|
@ -295,6 +300,16 @@ public:
|
||||||
/* cis原图初检 */
|
/* cis原图初检 */
|
||||||
int test_cis__original_image(void *data)
|
int test_cis__original_image(void *data)
|
||||||
{
|
{
|
||||||
|
bool status = 0;
|
||||||
|
parameter* ptr = helper_->get_user_input(ui_helper::DATA_FROM_USER, ui_helper::VAL_TYPE_BOOL, set_test_name_.c_str(), L"请放纸,CIS原图检测,默认走纸一张");
|
||||||
|
if (ptr)
|
||||||
|
status = *((bool*)ptr->get_data());
|
||||||
|
if (status)
|
||||||
|
{
|
||||||
|
helper_->test_callback((wchar_t*)data, ui_helper::TEST_EVENT_RESULT, (void*)L"已退出歪斜检测流程", false);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
const wchar_t* NAME = (wchar_t*)data;
|
const wchar_t* NAME = (wchar_t*)data;
|
||||||
SANE_Bool type = true;
|
SANE_Bool type = true;
|
||||||
unsigned int len = sizeof(SANE_Bool);
|
unsigned int len = sizeof(SANE_Bool);
|
||||||
|
|
Loading…
Reference in New Issue