This commit is contained in:
13038267101 2023-10-27 11:10:33 +08:00
commit 12ae6591b9
7 changed files with 264 additions and 17 deletions

View File

@ -1087,6 +1087,7 @@ namespace setting3399
SR_GET_TOKEN_LENGHT, SR_GET_TOKEN_LENGHT,
SR_DECODE_TOKEN, SR_DECODE_TOKEN,
SR_CLEAN_PAPER_ROAD, //清理纸道 SR_CLEAN_PAPER_ROAD, //清理纸道
SR_BACKUP_RESTORES_HUAGODIR=67,
SR_GET_CUO_ERROR = 0x50, SR_GET_CUO_ERROR = 0x50,
SR_GET_DOU_ERROR, SR_GET_DOU_ERROR,
SR_GET_JAM_ERROR, SR_GET_JAM_ERROR,
@ -1106,6 +1107,9 @@ namespace setting3399
SR_SET_H_600_RATIO, SR_SET_H_600_RATIO,
SR_GET_V_600_RATIO, SR_GET_V_600_RATIO,
SR_SET_V_600_RATIO, SR_SET_V_600_RATIO,
SR_GET_ARM_DATETIME=101,
SR_GET_ARM_DATETIME_LENGHT=102,
SR_SET_ARM_DATETIME=103,
SR_UPDATA_START = 0x100, SR_UPDATA_START = 0x100,
SR_UPDATA_STAUTUS = 0x101, SR_UPDATA_STAUTUS = 0x101,
SR_UPDATA_MD5_RELUST = 0x102, SR_UPDATA_MD5_RELUST = 0x102,

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)
@ -4702,6 +4703,16 @@ int hg_scanner::device_io_control(unsigned long code, void* data, unsigned* len)
return ret; return ret;
} }
else if (code == IO_CTRL_CODE_SET_BACKUP)
{
int ret = set_backup();
return ret;
}
else if (code == IO_CTRL_CODE_SET_RESTORE)
{
int ret = set_restore();
return ret;
}
else if (code == IO_CTRL_CODE_GET_SCAN_WITH_HOLE) else if (code == IO_CTRL_CODE_GET_SCAN_WITH_HOLE)
{ {
*(SANE_Bool*)data = image_prc_param_.bits.rid_hole || isremove_left_hole || isremove_low_hole || isremove_right_hole || isremove_top_hole ? SANE_TRUE : SANE_FALSE; *(SANE_Bool*)data = image_prc_param_.bits.rid_hole || isremove_left_hole || isremove_low_hole || isremove_right_hole || isremove_top_hole ? SANE_TRUE : SANE_FALSE;
@ -4888,6 +4899,14 @@ int hg_scanner::get_devs_disk(string& disk)
{ {
return SCANNER_ERR_DEVICE_NOT_SUPPORT; return SCANNER_ERR_DEVICE_NOT_SUPPORT;
} }
int hg_scanner::set_restore()
{
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::set_backup()
{
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
}
int hg_scanner::set_device_model(string sts) int hg_scanner::set_device_model(string sts)
{ {
return SCANNER_ERR_DEVICE_NOT_SUPPORT; return SCANNER_ERR_DEVICE_NOT_SUPPORT;
@ -5142,18 +5161,18 @@ void hg_scanner::image_process(std::shared_ptr<tiny_buffer>& buffer, uint32_t id
(this->*dump_img_)(ImagePrc_pHandle_, "colorCorrection"); (this->*dump_img_)(ImagePrc_pHandle_, "colorCorrection");
} }
if (((img_conf_.en_fold && pid_ != 0x239 && pid_ != 0x439)))
{
hg_imgproc::fold(ImagePrc_pHandle_);
(this->*dump_img_)(ImagePrc_pHandle_, "fold");
}
if (((img_conf_.imageRotateDegree != TEXT_DIRECTION_0 || img_conf_.is_backrotate180) && (!img_conf_.is_autotext)) && (pid_ != 0x239 && pid_ != 0x439)) if (((img_conf_.imageRotateDegree != TEXT_DIRECTION_0 || img_conf_.is_backrotate180) && (!img_conf_.is_autotext)) && (pid_ != 0x239 && pid_ != 0x439))
{ {
hg_imgproc::orentation(ImagePrc_pHandle_); hg_imgproc::orentation(ImagePrc_pHandle_);
(this->*dump_img_)(ImagePrc_pHandle_, "orentation"); (this->*dump_img_)(ImagePrc_pHandle_, "orentation");
} }
if (((img_conf_.en_fold && pid_ != 0x239 && pid_ != 0x439)))
{
hg_imgproc::fold(ImagePrc_pHandle_);
(this->*dump_img_)(ImagePrc_pHandle_, "fold");
}
if ((img_conf_.textureRemove) && (pid_ != 0x239 && pid_ != 0x439)) if ((img_conf_.textureRemove) && (pid_ != 0x239 && pid_ != 0x439))
{ {
//hg_imgproc::textureRemove(ImagePrc_pHandle_); //hg_imgproc::textureRemove(ImagePrc_pHandle_);

View File

@ -393,6 +393,10 @@ 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; //固件支持 双张校验 231021
bool firmware_sup_dirty_check; //固件支持 脏污检测 231021
bool firmware_sup_backup_restore; //固件支持 备份还原 231021
bool firmware_sup_boardTime; //固件支持 板级时间校验 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;
@ -566,6 +570,8 @@ public:
virtual int get_devs_cpu(string& cpu); //获取设备内存大小 virtual int get_devs_cpu(string& cpu); //获取设备内存大小
virtual int get_devs_disk(string& disk); //获取设备硬盘容量大小 virtual int get_devs_disk(string& disk); //获取设备硬盘容量大小
virtual int set_restore(); //还原文件
virtual int set_backup(); //备份文件
}; };

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
#pragma once #pragma once
// hg_scanner is the base class of kinds of scanners // hg_scanner is the base class of kinds of scanners
// //
@ -51,6 +51,8 @@ class hg_scanner_239 : public hg_scanner
int write_control_device_files(std::string file_path,std::string file_str); int write_control_device_files(std::string file_path,std::string file_str);
int read_control_device_files(std::string file_path, std::string &file_str); int read_control_device_files(std::string file_path, std::string &file_str);
int update_boarddatetime();
protected: protected:
virtual void on_device_reconnected(void) override; virtual void on_device_reconnected(void) override;
virtual int on_scanner_closing(bool force) override; virtual int on_scanner_closing(bool force) override;
@ -74,7 +76,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:
@ -146,5 +148,7 @@ public:
virtual int get_devs_time(string& times); //获取设备时间 //3399设备支持 virtual int get_devs_time(string& times); //获取设备时间 //3399设备支持
virtual int get_devs_cpu(string& cpu); //获取设备内存大小 virtual int get_devs_cpu(string& cpu); //获取设备内存大小
virtual int get_devs_disk(string& disk); //获取设备硬盘容量大小 virtual int get_devs_disk(string& disk); //获取设备硬盘容量大小
virtual int set_restore(); //还原文件
virtual int set_backup(); //备份文件
}; };

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);
@ -65,6 +66,7 @@ private:
void writedown_image_configuration(void); void writedown_image_configuration(void);
void printf_devconfig(setting_hardware::HGSCANCONF_3288 *d = NULL); void printf_devconfig(setting_hardware::HGSCANCONF_3288 *d = NULL);
int get_devs_distortion_check_val(float& data, int dpi, int dir);//获取设备畸变值 DPI=1、2、3 dir = 0,1; int get_devs_distortion_check_val(float& data, int dpi, int dir);//获取设备畸变值 DPI=1、2、3 dir = 0,1;
int update_boarddatetime();
///////////////////////7010专有协议获取校正数据////////////////////// ///////////////////////7010专有协议获取校正数据//////////////////////
//inx:序号// //inx:序号//
@ -125,4 +127,6 @@ public:
virtual int set_updata0303(void)override; virtual int set_updata0303(void)override;
virtual int get_devs_cpu(string& cpu); //获取设备内存大小 virtual int get_devs_cpu(string& cpu); //获取设备内存大小
virtual int get_devs_disk(string& disk); //获取设备硬盘容量大小 virtual int get_devs_disk(string& disk); //获取设备硬盘容量大小
virtual int set_restore(); //还原文件
virtual int set_backup(); //备份文件
}; };