300d8设备增加镜头脏污检测

This commit is contained in:
yangjiaxuan 2023-10-25 19:50:29 +08:00
parent d172dc3685
commit 716d5db92b
6 changed files with 36 additions and 6 deletions

View File

@ -161,7 +161,8 @@ hg_scanner::hg_scanner(ScannerSerial serial, const char* dev_name, usb_io* io, i
, is_auto_paper_scan_exit_time(60), is_read_int(true), is_auto_feedmode_(false) , is_auto_paper_scan_exit_time(60), is_read_int(true), is_auto_feedmode_(false)
, firmware_sup_wait_paper_(false),firmware_sup_pick_strength_(false),firmware_sup_log_export_(false),firmware_sup_color_corr_(false),firmware_sup_wake_device_(false) , firmware_sup_wait_paper_(false),firmware_sup_pick_strength_(false),firmware_sup_log_export_(false),firmware_sup_color_corr_(false),firmware_sup_wake_device_(false)
, firmware_sup_double_img(false),firmware_sup_devs_lock_(false),firmware_sup_dpi_300(false),firmware_sup_dpi_600(false),firmware_sup_auto_speed_(false),firmware_sup_morr_(false) , firmware_sup_double_img(false),firmware_sup_devs_lock_(false),firmware_sup_dpi_300(false),firmware_sup_dpi_600(false),firmware_sup_auto_speed_(false),firmware_sup_morr_(false)
, firmware_sup_color_fill_(false),firmware_sup_history_cnt(false), have_max_size(false), is_discardblank(false),firmware_sup_device_7010(false) , firmware_sup_color_fill_(false),firmware_sup_history_cnt(false), have_max_size(false), is_discardblank(false),firmware_sup_device_7010(false), firmware_sup_double_check(false)
, firmware_sup_dirty_check(false)
, auto_scan_restore_(false), auto_scan_prev_(is_auto_paper_scan) , auto_scan_restore_(false), auto_scan_prev_(is_auto_paper_scan)
{ {
#if !defined(_WIN32) && !defined(_WIN64) &&defined(x86_64) #if !defined(_WIN32) && !defined(_WIN64) &&defined(x86_64)

View File

@ -391,6 +391,8 @@ protected:
bool firmware_sup_morr_; //固件支持 摩尔纹 139 239-3C0518 bool firmware_sup_morr_; //固件支持 摩尔纹 139 239-3C0518
bool firmware_sup_color_fill_; //固件支持 色彩填充 139 239 439 -3C bool firmware_sup_color_fill_; //固件支持 色彩填充 139 239 439 -3C
bool firmware_sup_history_cnt; //固件支持 清除历史张数 3288 G300 220303 bool firmware_sup_history_cnt; //固件支持 清除历史张数 3288 G300 220303
bool firmware_sup_double_check; //固件支持 双张校验 139 239-231017 300-231021
bool firmware_sup_dirty_check; //固件支持 脏污检测 231021
bool firmware_sup_device_7010; //G300 设备但是7010 2023/9/21 bool firmware_sup_device_7010; //G300 设备但是7010 2023/9/21
int mat_width; int mat_width;
int mat_height; int mat_height;

View File

@ -522,6 +522,9 @@ void hg_scanner_239::init_version(void)
string devType; string devType;
string year_date = fv.substr(4, 6); string year_date = fv.substr(4, 6);
firmware_sup_double_check = year_date.compare("231017") >= 0 ? true : false;
firmware_sup_dirty_check = year_date.compare("231021") >= 0 ? true : false;
if (dev == "G1" || dev == "G2") if (dev == "G1" || dev == "G2")
{ {
firmware_sup_wait_paper_ = year_date.compare("3B0431") >= 0 ? true : false; firmware_sup_wait_paper_ = year_date.compare("3B0431") >= 0 ? true : false;
@ -1080,11 +1083,17 @@ int hg_scanner_239::on_cis_get_image(bool isautopaper)
} }
int hg_scanner_239::on_process_double_paper(bool type) int hg_scanner_239::on_process_double_paper(bool type)
{ {
if (!firmware_sup_double_check)
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
dev_conf_.params_3399.double_out_en = type; dev_conf_.params_3399.double_out_en = type;
return SCANNER_ERR_OK; return SCANNER_ERR_OK;
} }
int hg_scanner_239::on_detect_lens_dirty(bool type) int hg_scanner_239::on_detect_lens_dirty(bool type)
{ {
if (!firmware_sup_dirty_check)
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
is_lens_dirty = type; is_lens_dirty = type;
return SCANNER_ERR_OK; return SCANNER_ERR_OK;
} }

View File

@ -74,7 +74,7 @@ protected:
virtual int on_is_auto_paper(bool isautopaper)override; //待纸扫描 virtual int on_is_auto_paper(bool isautopaper)override; //待纸扫描
virtual int on_cis_get_image(bool isautopaper) override; //cis 原图获取 virtual int on_cis_get_image(bool isautopaper) override; //cis 原图获取
virtual int on_process_double_paper(bool type) override; //双张图像校验 virtual int on_process_double_paper(bool type) override; //双张图像校验
virtual int on_detect_lens_dirty(bool type); //检测镜头脏污 virtual int on_detect_lens_dirty(bool type) override; //检测镜头脏污
public: public:

File diff suppressed because one or more lines are too long

View File

@ -45,6 +45,7 @@ protected:
virtual int on_is_auto_paper(bool isautopaper)override; //待纸扫描 virtual int on_is_auto_paper(bool isautopaper)override; //待纸扫描
virtual int on_cis_get_image(bool isautopaper) override; //cis 原图获取 virtual int on_cis_get_image(bool isautopaper) override; //cis 原图获取
virtual int on_process_double_paper(bool type) override; //双张图像校验 virtual int on_process_double_paper(bool type) override; //双张图像校验
virtual int on_detect_lens_dirty(bool type) override; //检测镜头脏污
public: public:
hg_scanner_300(const char* dev_name,int pid, usb_io* io); hg_scanner_300(const char* dev_name,int pid, usb_io* io);