调整待纸扫描

This commit is contained in:
13038267101 2022-11-26 17:48:10 +08:00
parent b9d4080d6a
commit 346cd707f5
5 changed files with 37 additions and 25 deletions

View File

@ -99,7 +99,8 @@ hg_scanner::hg_scanner(ScannerSerial serial
, async_io_(false), is_white_0_(true), isremove_left_hole(false), isremove_right_hole(false), isremove_top_hole(false), isremove_low_hole(false)
, isremove_left_hole_threshold(0), isremove_right_hole_threshold(0), isremove_top_hole_threshold(0), isremove_low_hole_threshold(0)
, dump_usb_path_(""),is_kernelsnap_211209_(false), pid_(0), dump_img_(&hg_scanner::dump_image_empty), is_kernelsnap_220830_(false),is_kernelsnap3288_221106_(false)
, is_kernelsnap_221027_(false), memory_size_(1024/*USB+JPEG压缩及图像处理图队列总共1GB*/), isx86_Advan_(true), stop_fatal_(SCANNER_ERR_OK)
, is_kernelsnap_221027_(false), memory_size_(1024/*USB+JPEG压缩及图像处理图队列总共1GB*/), isx86_Advan_(true), stop_fatal_(SCANNER_ERR_OK), is_auto_paper_scan(false)
,size_check(false), save_sleeptime_type_(false)
{
#if !defined(_WIN32) && !defined(_WIN64) &&defined(x86_64)
isx86_Advan_ = false;
@ -1640,7 +1641,6 @@ int hg_scanner::setting_scan_count(void* data)
{
scan_count_ = *((int*)data);
}
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "set scanning pages to %d\n", scan_count_);
return ret;
@ -1893,6 +1893,13 @@ int hg_scanner:: setting_auto_pick_paper_threshold(void* data)
int hg_scanner:: setting_auto_paper_scan(void* data)
{
is_auto_paper_scan = *((bool *)data);
if (!is_kernelsnap_220430_ && is_auto_paper_scan)
{
is_auto_paper_scan = *(bool*)data = false;
notify_ui_working_status(STATU_DESC_SCANNER_ERR_DEVICE_NOT_SUPPORTED, SANE_EVENT_ERROR, status_);
return SCANNER_ERR_OK;
}
if (!is_auto_paper_scan)
{
on_is_auto_paper(is_auto_paper_scan);

View File

@ -851,13 +851,17 @@ int hg_scanner_200::notify_sleep()
}
int hg_scanner_200::get_history_roller_count(int& num)
{
int ret = SCANNER_ERR_OK;
int ret = SCANNER_ERR_OK,
len = 0;
USBCB usbcb = { setting3288dsp::GET_SCANN_NUM,num, 0 };
ret = io_->read_bulk(&usbcb, &len);
return ret;
}
int hg_scanner_200::get_roller_num(int& val)
{
int ret = SCANNER_ERR_OK;
int ret = SCANNER_ERR_OK,
len = 0;
USBCB usbcb = { setting3288dsp::GET_ROLLER_NUM,val, 0 };
ret = io_->read_bulk(&usbcb, &len);
return ret;
}

File diff suppressed because one or more lines are too long

View File

@ -773,13 +773,17 @@ int hg_scanner_300::notify_sleep()
}
int hg_scanner_300::get_history_roller_count(int& num)
{
int ret = SCANNER_ERR_OK;
int ret = SCANNER_ERR_OK,
len = 0;
USBCB usbcb = { setting3288dsp::GET_SCANN_NUM,num, 0 };
ret = io_->read_bulk(&usbcb, &len);
return ret;
}
int hg_scanner_300::get_roller_num(int& val)
{
int ret = SCANNER_ERR_OK;
int ret = SCANNER_ERR_OK,
len = 0;
USBCB usbcb = { setting3288dsp::GET_ROLLER_NUM,val, 0 };
ret = io_->read_bulk(&usbcb, &len);
return ret;
}

View File

@ -776,13 +776,17 @@ int hg_scanner_400::notify_sleep()
}
int hg_scanner_400::get_history_roller_count(int& num)
{
int ret = SCANNER_ERR_OK;
USBCB usbcb = { setting3288dsp::GET_SCANN_NUM,num, 0 };
int ret = SCANNER_ERR_OK,
len = 0;
USBCB usbcb = { setting3288dsp::GET_SCANN_NUM,len, 0 };
ret = io_->read_bulk(&usbcb, &num);
return ret;
}
int hg_scanner_400::get_roller_num(int& val)
{
int ret = SCANNER_ERR_OK;
USBCB usbcb = { setting3288dsp::GET_ROLLER_NUM,val, 0 };
int ret = SCANNER_ERR_OK,
len = 0;
USBCB usbcb = { setting3288dsp::GET_ROLLER_NUM,len, 0 };
ret = io_->read_bulk(&usbcb, &val);
return ret;
}