固件不支持时,屏蔽脏污检测功能

This commit is contained in:
yangjiaxuan 2023-10-31 19:10:42 +08:00
parent 41ebdc282f
commit 325f3c2888
6 changed files with 17 additions and 9 deletions

View File

@ -1454,6 +1454,11 @@ bool hg_scanner::jsn_reorganize()
{
erase_option(SANE_STD_OPT_NAME_SIZE_CHECK);
}
if (!firmware_sup_dirty_check)
{
erase_option(SANE_STD_OPT_NAME_LENS_DIRTY);
}
return true;
}
int hg_scanner::hgpaper_to_devspaper(Paper_Map papermap[], int len, int& paper, bool* exact, TwSS* type)
@ -3055,7 +3060,7 @@ int hg_scanner::on_process_double_paper(bool type)
{
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::on_detect_lens_dirty(bool type)
int hg_scanner::on_detect_lens_dirty(bool &type)
{
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}

View File

@ -264,7 +264,7 @@ protected:
virtual int on_is_auto_paper(bool isautopaper) = 0; //待纸扫描
virtual int on_cis_get_image(bool type) = 0;
virtual int on_process_double_paper(bool type) = 0; //双张图像校验
virtual int on_detect_lens_dirty(bool type); //检测镜头脏污
virtual int on_detect_lens_dirty(bool &type); //检测镜头脏污
virtual int on_set_period(int val); //PWM占空比
protected:
@ -393,8 +393,8 @@ protected:
bool firmware_sup_morr_; //固件支持 摩尔纹 139 239-3C0518
bool firmware_sup_color_fill_; //固件支持 色彩填充 139 239 439 -3C
bool firmware_sup_history_cnt; //固件支持 清除历史张数 3288 G300 220303
bool firmware_sup_double_check; //固件支持 双张校验 231021
bool firmware_sup_dirty_check; //固件支持 脏污检测 231021
bool firmware_sup_double_check; //固件支持 双张校验 231027
bool firmware_sup_dirty_check; //固件支持 脏污检测 231027
bool firmware_sup_backup_restore; //固件支持 备份还原 231021
bool firmware_sup_boardTime; //固件支持 板级时间校验 231021
bool firmware_sup_device_7010; //G300 设备但是7010 2023/9/21

View File

@ -1113,11 +1113,14 @@ int hg_scanner_239::on_process_double_paper(bool type)
dev_conf_.params_3399.double_out_en = type;
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)
{
type = false;
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
is_lens_dirty = type;
return SCANNER_ERR_OK;
}

View File

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

View File

@ -1239,7 +1239,7 @@ int hg_scanner_300::on_process_double_paper(bool type)
dsp_config.params_3288.en_doublefeed_check = type;
return SCANNER_ERR_OK;
}
int hg_scanner_300::on_detect_lens_dirty(bool type)
int hg_scanner_300::on_detect_lens_dirty(bool &type)
{
if (!firmware_sup_dirty_check)
return SCANNER_ERR_DEVICE_NOT_SUPPORT;

View File

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