调整获取畸变时,出现走纸等错误,返回信息过慢

This commit is contained in:
13038267101 2023-03-01 15:36:05 +08:00
parent a93a8dffa4
commit ca96accbbc
1 changed files with 14 additions and 3 deletions

View File

@ -121,6 +121,7 @@ int get_json_config_file()
}
static std::wstring set_test_name_ =L"";
bool is_distortion_get_image = false;
bool is_distortion_get_image_abnormal = false;
class test
{
ui_helper* helper_;
@ -372,6 +373,7 @@ public:
{
type = false;
is_distortion_get_image = false;
is_distortion_get_image_abnormal = true;
wcscpy(buf, L"畸变修正值获取失败,原因--->");
}
else
@ -595,7 +597,11 @@ public:
helper_->test_callback(name, ui_helper::TEST_EVENT_NOT_FIND_TEST, NULL, false);
return ret;
}
if (ret != SCANNER_ERR_OK && ret != -1)
if (ret == SCANNER_ERR_DEVICE_NOT_SUPPORT
|| ret == SCANNER_ERR_IO
|| ret == SCANNER_ERR_TIMEOUT
|| ret == SCANNER_ERR_NO_DATA
)
{
helper_->test_callback(name, ui_helper::TEST_EVENT_IO_FAIL, NULL, ret);
}
@ -1001,6 +1007,9 @@ public:
else if (cnt == 30)
break;
if (is_distortion_get_image_abnormal)
return;
Sleep(1000);
cnt++;
}
@ -1268,6 +1277,8 @@ 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;
is_distortion_get_image_abnormal = false;
int ret = 0;
SANE_Bool type = false;
unsigned int len = sizeof(SANE_Bool);