修复首张双张上传图片;增加G302设备

This commit is contained in:
gb 2022-08-13 15:06:32 +08:00
parent 2f1520a651
commit f00878af6a
4 changed files with 25 additions and 6 deletions

View File

@ -1569,12 +1569,25 @@ void hg_scanner_239::thread_handle_usb_read(void)
if (status_ != SCANNER_ERR_OK && status_ != SCANNER_ERR_TIMEOUT && status_ != SCANNER_ERR_DEVICE_STOPPED)
{
if (!is_dev_image_process_done())
if (!is_dev_image_process_done() || (double_paper_handle_ & DOUBLE_PAPER_SAVE_IMG))
{
int st = status_, count = 0, statu = last_usb_image_statu(st);
while (!is_dev_image_process_done())
std::this_thread::sleep_for(std::chrono::milliseconds(30));
StopWatch delay;
if((double_paper_handle_ & DOUBLE_PAPER_SAVE_IMG) &&
st == SCANNER_ERR_DEVICE_DOUBLE_FEEDING)
{
int wait = 3000 + (img_conf_.resolution_dst / 200 * 10000);
while (get_image_count() == 0)
{
std::this_thread::sleep_for(std::chrono::milliseconds(30));
if (delay.elapsed_ms() > wait)
break;
}
}
while ((count = get_image_count()) > 0)
{
int s = SANE_Image_Statu_OK;

View File

@ -1809,7 +1809,7 @@ std::string hg_scanner_402::get_ip(void)
}
int hg_scanner_402::get_roller_num(void)
{
/*int val = 0,
int val = 0,
ret = read_register(SR_GET_ROLLER_NUM, &val);
if (ret == SCANNER_ERR_OK)
@ -1817,8 +1817,12 @@ int hg_scanner_402::get_roller_num(void)
else
{
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "get_roller_num = %s\n", hg_scanner_err_name(ret));
return -1;
}*/
return -2;
}
// return -2;
}
int hg_scanner_402::get_history_count(void)
{
return -2;
}
int hg_scanner_402::clear_roller_num(void)

View File

@ -95,7 +95,8 @@ public:
virtual int get_compression_format(void);//获取支持的压缩格式 ***功能不支持
virtual int get_roller_num(void); //获取滚轮张数 ***完成
virtual int clear_roller_num(void); // 清除滚轴计数 ***完成
virtual int get_history_count(void);//获取历史扫描张数 -2设备不支持该功能-1与设备通信失败其它大于等于0的为正常
virtual int clear_roller_num(void); // 清除滚轴计数 ***完成
virtual int set_compression_format(void);//设置图像数据最终输出的压缩格式 ***功能不支持
virtual int set_auto_color_type(void);// 设置自动匹配颜色模式 (基类实现) ***完成

View File

@ -41,7 +41,7 @@ g_supporting_devices[] = {
{0x2903, 0x7000, SCANNER_NAME_HW_7000, "HW-74x0WA", "", &hg_scanner_mgr::create_scanner_g400}
, {0x2903, 0x7002, SCANNER_NAME_HW_7002, "HW-7002", "", &hg_scanner_mgr::create_scanner_g402}
, {0x2903, 0x1000, SCANNER_NAME_HW_1060A, "HW-1060A", "", &hg_scanner_mgr::create_scanner_g300}
, {0x2903, 0x1002, SCANNER_NAME_HW_1060A, "HW-1060A", "", &hg_scanner_mgr::create_scanner_g300}
, {0x2903, 0x1002, SCANNER_NAME_HW_1060A, "HW-1060A", "", &hg_scanner_mgr::create_scanner_g402}
, {0x2903, 0x8000, SCANNER_NAME_HW_8090F, "HW-8090F", "", &hg_scanner_mgr::create_scanner_g239}
, {0x2903, 0x9000, SCANNER_NAME_HW_9110F, "HW-9110F", "", &hg_scanner_mgr::create_scanner_g239}
, {0x2903, 0x7039, SCANNER_NAME_HW_7039F, "HW-7039F", "", &hg_scanner_mgr::create_scanner_g239}
@ -55,6 +55,7 @@ g_supporting_devices[] = {
, {0x3072, 0x339, SCANNER_NAME_HG_G339, "GScanO1003399", "", &hg_scanner_mgr::create_scanner_empty}
, {0x3072, 0x439, SCANNER_NAME_HG_G439, "GScanO1003399", "", &hg_scanner_mgr::create_scanner_g239}
, {0x064B, 0x7823, SCANNER_NAME_HG_G200, "GScanO200", "", &hg_scanner_mgr::create_scanner_empty}
, {0x3072, 0x302, SCANNER_NAME_HG_G300, "GScanO400", "", &hg_scanner_mgr::create_scanner_g402}
, {0x3072, 0x402, SCANNER_NAME_HG_G402, "GScanO4003399", "", &hg_scanner_mgr::create_scanner_g402}
#endif
};