调整部分流程

This commit is contained in:
mo1027728827@qq.com 2022-05-04 11:07:55 +08:00
parent bf3879507b
commit c4252c9c2e
3 changed files with 14 additions and 14 deletions

View File

@ -523,7 +523,7 @@ int hg_scanner_200::get_img_data(unsigned int bytes)
status_ = ret;
return ret;
}
io_->set_timeout(2000);
io_->set_timeout(500);
while (total > 0)
{
@ -533,7 +533,7 @@ int hg_scanner_200::get_img_data(unsigned int bytes)
block = total;
ret = io_->read_bulk(imagedata->data() + index,&block);
io_->set_timeout(500); //不能删除可能会导致IO超时
if (ret != HG_ERR_OK)
break;
@ -975,14 +975,14 @@ void hg_scanner_200::writedown_image_configuration(void)
if (test_1_paper_)
{
HG_LOG(HG_LOG_LEVEL_DEBUG_INFO, "scanning mode: testing ONE paper ...\n");
ic.scannum = ic.is_duplex ? 2 : 1;
ic.scannum = 1;
}
else
{
ic.scannum = (ic.is_duplex ? scan_count_ * 2 : scan_count_);
ic.scannum = scan_count_;
}
ic.scannum = scan_count_;
ic.is_backrotate180 = image_prc_param_.bits.rotate_back_180;
ic.is_dogeardetection = image_prc_param_.bits.fractate_check;
@ -1144,13 +1144,13 @@ int hg_scanner_200::agreement()
int ret = HG_ERR_OK;
// if (image_prc_param_.bits.rid_color != RID_COLOR_NONE)
// {
// dsp_config_.params.color = 1;
// }
if (image_prc_param_.bits.rid_color != RID_COLOR_NONE)
{
dsp_config_.params.color = 1;
}
// ret = writedown_device_configuration(true);
// io_->set_timeout(200);
ret = writedown_device_configuration(true);
io_->set_timeout(200);
return ret;
}

View File

@ -1545,9 +1545,9 @@ int hg_scanner_239::start(void)
if (ret == HG_ERR_DEVICE_NO_PAPER)
{
status_ = ret;
notify_ui_working_status(STATU_DESC_HG_ERR_DEVICE_NO_PAPER, SANE_EVENT_SCAN_FINISHED, status_);
notify_ui_working_status(STATU_DESC_HG_ERR_DEVICE_NO_PAPER, SANE_EVENT_ERROR, status_);
HG_VLOG_MINI_1(HG_LOG_LEVEL_WARNING, "device start status is(%s)\n", STATU_DESC_HG_ERR_DEVICE_NO_PAPER);
return HG_ERR_OK;
return ret;
}
ret = write_command(SC_START);

View File

@ -358,7 +358,7 @@ void hg_scanner_300::thread_handle_usb_read(void)
status_ = ret;
notify_ui_working_status(STATU_DESC_HG_ERR_DEVICE_NO_PAPER, SANE_EVENT_SCAN_FINISHED, status_);
HG_VLOG_MINI_1(HG_LOG_LEVEL_WARNING, "device start status is(%s)\n", STATU_DESC_HG_ERR_DEVICE_NO_PAPER);
return HG_ERR_OK;
return ret;
}
USBCB usb = {START_COMMAND, img_conf_.scannum, 0};