解决动态校正无纸的情况下有异常的问题
This commit is contained in:
parent
a579da892e
commit
fdf5dd261d
|
@ -721,10 +721,18 @@ void test::thread_dynamic_correct(std::string correctData)
|
|||
return;
|
||||
}
|
||||
|
||||
SANE_Bool type = true;
|
||||
unsigned int len = sizeof(SANE_Bool);
|
||||
int ret = helper_->io_control(IO_CTRL_CODE_GET_PAPER_ON, &type, &len);
|
||||
if (!type)
|
||||
{
|
||||
helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"无纸", false);
|
||||
return;
|
||||
}
|
||||
CorrectMode correctMode = m_correctModeMap.at(g_currentCorrectType);
|
||||
int dpi = correctMode.dpi;
|
||||
bool isColor = correctMode.isColor;
|
||||
int ret = public_test_image_correct(correctData, dpi, isColor);
|
||||
ret = public_test_image_correct(correctData, dpi, isColor);
|
||||
g_currentCorrectType++;
|
||||
}
|
||||
}
|
||||
|
@ -1784,6 +1792,8 @@ int test::test_image_correct_all(void* data)
|
|||
}
|
||||
|
||||
g_currentCorrectType = 1;
|
||||
if (thread_dynamic_correct_handle.get() && thread_dynamic_correct_handle->joinable())
|
||||
thread_dynamic_correct_handle->join();
|
||||
thread_dynamic_correct_handle.reset(new std::thread(&test::thread_dynamic_correct, this, str));
|
||||
|
||||
return SCANNER_ERR_OK;
|
||||
|
|
Loading…
Reference in New Issue