调整国产系统sane驱动的双张纸流程;

启动扫描时第一张为双张,sane_start返回值不能正常报错
This commit is contained in:
yangjiaxuan 2024-01-13 14:12:01 +08:00
parent a9e9899319
commit 0d64b48c3a
1 changed files with 3 additions and 2 deletions

View File

@ -4165,9 +4165,9 @@ int hg_scanner::wait_one_image_from_start(bool& handled)
handled = false;
if (!async_io_) // non-callback, async do this in upper level
{
handled = true;
while (is_running() != THREAD_RUNNING_IDLE)
{
handled = true;
if (final_imgs_.size())
{
break;
@ -4195,8 +4195,9 @@ int hg_scanner::wait_one_image_from_start(bool& handled)
}
else if (handled) // overed normal or exception
{
bool reserveDoubleImg = (double_paper_handle_) ? false : true;
if (status_ == SCANNER_ERR_OK
|| status_ == SCANNER_ERR_DEVICE_DOUBLE_FEEDING) // 双张特殊处理,视为成功
|| (reserveDoubleImg && status_ == SCANNER_ERR_DEVICE_DOUBLE_FEEDING)) // 双张校验时特殊处理,视为成功
{
SANE_Bool has_paper = SANE_FALSE;