删除439双张,新增设置睡眠时间,调整G300 D8超时设置
This commit is contained in:
parent
6540b8707d
commit
6a20190dcd
|
@ -512,9 +512,8 @@ int double_paper_flag_from_option_value(std::string& opt_val, bool* exact)
|
|||
{
|
||||
if (exact)
|
||||
*exact = opt_val == hg_log::lang_load(ID_OPTION_VALUE_SZTPCL_DQTXBTZSM);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string double_paper_flag_to_option_value(int flag)
|
||||
|
|
|
@ -3881,7 +3881,7 @@ void hg_scanner::image_process(std::shared_ptr<tiny_buffer>& buffer, uint32_t id
|
|||
double top = isremove_top_hole ? isremove_top_hole_threshold : 0;
|
||||
double low = isremove_low_hole ? isremove_low_hole_threshold : 0;
|
||||
|
||||
ret = hg_imgproc::fillhole(ImagePrc_pHandle_, top, top, left, right);
|
||||
ret = hg_imgproc::fillhole(ImagePrc_pHandle_, top, low, left, right);
|
||||
|
||||
(this->*dump_img_)(ImagePrc_pHandle_, "fillhole");
|
||||
VLOG_MINI_1(LOG_LEVEL_WARNING, "Image proc fillhole is:%d\n", ret);
|
||||
|
@ -4217,7 +4217,7 @@ int hg_scanner::image_configuration(SCANCONF& ic)
|
|||
ic.dogeardistabce = fractate_level_;
|
||||
ic.fadeback = image_prc_param_.bits.erase_bakground;
|
||||
ic.fadebackrange = erase_bkg_range_;
|
||||
ic.isuoloadexceptionimage = (double_paper_handle_ & DOUBLE_PAPER_SAVE_IMG) == DOUBLE_PAPER_SAVE_IMG;
|
||||
ic.isuoloadexceptionimage = pid_ == 0x0439 ? false : (double_paper_handle_ & DOUBLE_PAPER_SAVE_IMG) == DOUBLE_PAPER_SAVE_IMG;
|
||||
adjust_filling_hole(&ic);
|
||||
|
||||
ic.fold_concatmode = fold_type_;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -115,8 +115,9 @@ void hg_scanner_300::thread_handle_usb_read(void)
|
|||
int ret = SCANNER_ERR_OK,
|
||||
status = SCANNER_ERR_OK;
|
||||
StopWatch sw;
|
||||
sw.reset();
|
||||
SANE_Image_Statu statu = SANE_Image_Statu_OK;
|
||||
|
||||
int img_num = 0;
|
||||
savestatus_.clear();
|
||||
VLOG_MINI_1(LOG_LEVEL_WARNING, "thread_handle_usb_read run is:%d\n", run_);
|
||||
while (run_)
|
||||
|
@ -202,12 +203,11 @@ void hg_scanner_300::thread_handle_usb_read(void)
|
|||
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "%s\n", hg_scanner_err_name(status_));
|
||||
break;
|
||||
}
|
||||
if (sw.elapsed_ms() > 30000)//防止状态信息一直取不上来导致卡死
|
||||
if (sw.elapsed_ms() > 30000 )//防止状态信息一直取不上来导致卡死
|
||||
{
|
||||
if (img_conf_.papertype == TwSS::MaxSize && pid_ == 0x0300 && is_kernelsnap3288_230210_)
|
||||
{
|
||||
sw.reset();
|
||||
VLOG_MINI_1(LOG_LEVEL_WARNING, "thread_handle_usb_read run is:%d\n", run_);
|
||||
hg_log::log(LOG_LEVEL_WARNING, "while 30S\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -215,15 +215,22 @@ void hg_scanner_300::thread_handle_usb_read(void)
|
|||
//但是在【端点】又获取不到有纸还是无纸的状态,所以只能通过等待超时,再来【主动】获取有无纸张。
|
||||
status_ = !savestatus_.empty() ? savestatus_[0] : SCANNER_ERR_TIMEOUT;//以第一个消息为准
|
||||
savestatus_.clear();
|
||||
hg_log::log(LOG_LEVEL_WARNING, "get status timeout,get image out\n");
|
||||
hg_log::log(LOG_LEVEL_WARNING, "get status timeout,get image out 30S\n");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (sw.elapsed_ms() > 60000)
|
||||
{
|
||||
status_ = !savestatus_.empty() ? savestatus_[0] : SCANNER_ERR_TIMEOUT;//以第一个消息为准
|
||||
savestatus_.clear();
|
||||
hg_log::log(LOG_LEVEL_WARNING, "MaxSize OutTime 60S\n");
|
||||
break;
|
||||
}
|
||||
if (ret == SCANNER_ERR_OK && usb.u32_Count > 0)
|
||||
{
|
||||
int totalNum = usb.u32_Count & 0x3fffffff; // 2022-08-04: 兼容Android,默认图片大小均在1GB以内
|
||||
VLOG_MINI_2(LOG_LEVEL_WARNING, "Get Scaner Image Size:%d bytes,Image Num[%d]\n", totalNum,img_num);
|
||||
img_num++;
|
||||
if (totalNum)
|
||||
{
|
||||
std::shared_ptr<tiny_buffer> imagedata(aquire_memory(totalNum));
|
||||
|
@ -550,6 +557,8 @@ int hg_scanner_300::on_paper_check_changed(bool& check)
|
|||
{
|
||||
check = false;
|
||||
notify_ui_working_status(hg_log::lang_load(ID_STATU_DESC_SCANNER_ERR_DEVICE_NOT_SUPPORT), SANE_EVENT_ERROR, status_);
|
||||
|
||||
//VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "on_paper_check_changed:%s\r\n", hg_log::lang_load(ID_STATU_DESC_SCANNER_ERR_DEVICE_NOT_SUPPORT));
|
||||
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
|
||||
}
|
||||
int ret = SCANNER_ERR_OK;
|
||||
|
|
|
@ -118,7 +118,7 @@ void hg_scanner_400::thread_handle_usb_read(void)
|
|||
}
|
||||
if (ret != SCANNER_ERR_OK && ret != SCANNER_ERR_DEVICE_STOPPED && ret != SCANNER_ERR_NO_DATA)
|
||||
{
|
||||
statu = last_usb_image_statu(ret);
|
||||
//statu = last_usb_image_statu(ret);
|
||||
savestatus_.push_back(ret);
|
||||
}
|
||||
else if (ret != SCANNER_ERR_NO_DATA && ret != SCANNER_ERR_DEVICE_AUTO_FAIL_OVER && ret != SCANNER_ERR_DEVICE_AUTO_FAIL_INFO)
|
||||
|
|
|
@ -39,7 +39,7 @@ g_supporting_devices[] = {
|
|||
, {0x31c9, PID_AND_NAME(8420, SCANNER_NAME_LSC_G42S), "G42S", "", &hg_scanner_mgr::create_scanner_g300}
|
||||
, {0x31c9, PID_AND_NAME(8429, SCANNER_NAME_LSC_G42S), "G42S", "", &hg_scanner_mgr::create_scanner_empty}
|
||||
, {0x31c9, PID_AND_NAME(8520, SCANNER_NAME_LSC_G52S), "G52S", "", &hg_scanner_mgr::create_scanner_g400}
|
||||
, {0x31c9, PID_AND_NAME(8529, SCANNER_NAME_LSC_G52S), "G52S", "", &hg_scanner_mgr::create_scanner_g239}
|
||||
, {0x31c9, PID_AND_NAME(8529, SCANNER_NAME_LSC_G52S), "G52S", "", &hg_scanner_mgr::create_scanner_g439}
|
||||
, {0x31c9, PID_AND_NAME(8620, SCANNER_NAME_LSC_G62S), "G62S", "", &hg_scanner_mgr::create_scanner_g100}
|
||||
, {0x31c9, PID_AND_NAME(8629, SCANNER_NAME_LSC_G62S), "G62S", "", &hg_scanner_mgr::create_scanner_g239}
|
||||
, {0x31c9, PID_AND_NAME(8730, SCANNER_NAME_LSC_G73S), "G73S", "", &hg_scanner_mgr::create_scanner_g100}
|
||||
|
@ -50,7 +50,7 @@ g_supporting_devices[] = {
|
|||
, {0x2903, 0x1002, SCANNER_NAME_HW_1002, SCANNER_NAME_HW_1002, "", &hg_scanner_mgr::create_scanner_g302} // "HW-1060A"
|
||||
, {0x2903, 0x7000, SCANNER_NAME_HW_7000, SCANNER_NAME_HW_7000, "", &hg_scanner_mgr::create_scanner_g400} // "HW-74x0WA"
|
||||
, {0x2903, 0x7002, SCANNER_NAME_HW_7002, SCANNER_NAME_HW_7002, "", &hg_scanner_mgr::create_scanner_g402} // "HW-7002"
|
||||
, {0x2903, 0x7039, SCANNER_NAME_HW_7039, SCANNER_NAME_HW_7039, "", &hg_scanner_mgr::create_scanner_g239} // "HW-7039F"
|
||||
, {0x2903, 0x7039, SCANNER_NAME_HW_7039, SCANNER_NAME_HW_7039, "", &hg_scanner_mgr::create_scanner_g439} // "HW-7039F"
|
||||
, {0x2903, 0x8000, SCANNER_NAME_HW_8000, SCANNER_NAME_HW_8000, "", &hg_scanner_mgr::create_scanner_g239} // "HW-8090F"
|
||||
, {0x2903, 0x9000, SCANNER_NAME_HW_9000, SCANNER_NAME_HW_9000, "", &hg_scanner_mgr::create_scanner_g239} // "HW-9110E"
|
||||
#elif defined(OEM_CANGTIAN)
|
||||
|
|
Loading…
Reference in New Issue