Compare commits
3 Commits
c9f623f316
...
18f17686df
Author | SHA1 | Date |
---|---|---|
13038267101 | 18f17686df | |
13038267101 | ad0c14a5ba | |
13038267101 | 49b6c4ab06 |
|
@ -140,24 +140,25 @@ static std::string bmp_821(unsigned char* bits/*bits data*/, int w, int h, int*
|
||||||
static bool is_firstopen_ = true; //第二次打开设备就不在去获取和设置设备锁定状态
|
static bool is_firstopen_ = true; //第二次打开设备就不在去获取和设置设备锁定状态
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// hg_scanner
|
// hg_scanner
|
||||||
hg_scanner::hg_scanner(ScannerSerial serial, const char* dev_name, usb_io* io,int pid)
|
hg_scanner::hg_scanner(ScannerSerial serial, const char* dev_name, usb_io* io, int pid)
|
||||||
: name_(dev_name ? dev_name : ""), io_(io), status_(SCANNER_ERR_NOT_START), serial_(serial)
|
: name_(dev_name ? dev_name : ""), io_(io), status_(SCANNER_ERR_NOT_START), serial_(serial)
|
||||||
, scan_count_(-1), run_(true), paper_size_(TwSS::A4), erase_bkg_range_(10), read_over_with_no_data_(false)
|
, scan_count_(-1), run_(true), paper_size_(TwSS::A4), erase_bkg_range_(10), read_over_with_no_data_(false)
|
||||||
, noise_range_(30), omit_empty_level_(50), resolution_(200), rid_hole_range_(10.0f)
|
, noise_range_(30), omit_empty_level_(50), resolution_(200), rid_hole_range_(10.0f)
|
||||||
, bright_(128), contrast_(4), gamma_(1.0f), threshold_(40), anti_noise_(8), margin_(5)
|
, bright_(128), contrast_(4), gamma_(1.0f), threshold_(40), anti_noise_(8), margin_(5)
|
||||||
, fractate_level_(50), ui_ev_cb_(ui_default_callback), scan_life_(NULL)
|
, fractate_level_(50), ui_ev_cb_(ui_default_callback), scan_life_(NULL)
|
||||||
, notify_setting_result_(false), user_cancel_(false), cb_mem_(true), test_1_paper_(false)
|
, notify_setting_result_(false), user_cancel_(false), cb_mem_(true), test_1_paper_(false)
|
||||||
, img_type_(""), online_(false),is_quality_(-1),is_color_fill(false),is_multiout(false),save_multiout(hg_log::lang_load(ID_OPTION_VALUE_DLSCLX_CS_HD_HB))
|
, img_type_(""), online_(false), is_quality_(-1), is_color_fill(false), is_multiout(false), save_multiout(hg_log::lang_load(ID_OPTION_VALUE_DLSCLX_CS_HD_HB))
|
||||||
, final_img_index_(0), custom_area_(false),save_sizecheck(false), bw_threshold_(128), custom_gamma_(false)
|
, final_img_index_(0), custom_area_(false), save_sizecheck(false), bw_threshold_(128), custom_gamma_(false)
|
||||||
, double_paper_handle_(0), keep_watermark_(false), save_feedmode_type_(false), feedmode_(1), sleeptime_(-1),split3399_(0)
|
, double_paper_handle_(0), keep_watermark_(false), save_feedmode_type_(false), feedmode_(1), sleeptime_(-1), split3399_(0)
|
||||||
, async_io_(false), is_white_0_(true), isremove_left_hole(false), isremove_right_hole(false), isremove_top_hole(false), isremove_low_hole(false)
|
, async_io_(false), is_white_0_(true), isremove_left_hole(false), isremove_right_hole(false), isremove_top_hole(false), isremove_low_hole(false)
|
||||||
, isremove_left_hole_threshold(0), isremove_right_hole_threshold(0), isremove_top_hole_threshold(0), isremove_low_hole_threshold(0)
|
, isremove_left_hole_threshold(0), isremove_right_hole_threshold(0), isremove_top_hole_threshold(0), isremove_low_hole_threshold(0)
|
||||||
, dump_usb_path_(""),is_kernelsnap_211209_(false),dump_img_(&hg_scanner::dump_image_empty), is_kernelsnap_220830_(false),is_kernelsnap3288_221106_(false)
|
, dump_usb_path_(""), is_kernelsnap_211209_(false), dump_img_(&hg_scanner::dump_image_empty), is_kernelsnap_220830_(false), is_kernelsnap3288_221106_(false)
|
||||||
, is_kernelsnap_221027_(false), memory_size_(2000/*USB+JPEG压缩及图像处理图队列,总共1GB*/), isx86_Advan_(true), stop_fatal_(SCANNER_ERR_OK), is_auto_paper_scan(false)
|
, is_kernelsnap_221027_(false), memory_size_(2000/*USB+JPEG压缩及图像处理图队列,总共1GB*/), isx86_Advan_(true), stop_fatal_(SCANNER_ERR_OK), is_auto_paper_scan(false)
|
||||||
, size_check(false), save_sleeptime_type_(false), is_kernelsnap_devsislock(false), is_checksum_strat_scan(false), is_cis_image(false)
|
, size_check(false), save_sleeptime_type_(false), is_kernelsnap_devsislock(false), is_checksum_strat_scan(false), is_cis_image(false)
|
||||||
, is_dpi_color_check(false),save_dpi_color_check_val(0.0f), is_auto_falt(false),HGVersion_mgr_(NULL), HGVersion_Init_(NULL)
|
, is_dpi_color_check(false), save_dpi_color_check_val(0.0f), is_auto_falt(false), HGVersion_mgr_(NULL), HGVersion_Init_(NULL)
|
||||||
, HGVersion_Islock_(NULL), HGVersion_Postlog_(NULL), HGVersion_Free_(NULL), Dynamicopen_HGVersion_pHandle_(NULL),pid_(pid), fetching_id_(-1)
|
, HGVersion_Islock_(NULL), HGVersion_Postlog_(NULL), HGVersion_Free_(NULL), Dynamicopen_HGVersion_pHandle_(NULL), pid_(pid), fetching_id_(-1)
|
||||||
, is_kernelsnap3288_230210_(false), color_correction_(false), is_kernelsnap_3C_cccc(false), is_kernelsnap_220500_(false), is_kernelsnap3288_230303_(false)
|
, is_kernelsnap3288_230210_(false), color_correction_(false), is_kernelsnap_3C_cccc(false), is_kernelsnap_220500_(false), is_kernelsnap3288_230303_(false)
|
||||||
|
, is_kernelsnap_211227_(false),is_auto_paper_scan_exit_time(60)
|
||||||
{
|
{
|
||||||
#if !defined(_WIN32) && !defined(_WIN64) &&defined(x86_64)
|
#if !defined(_WIN32) && !defined(_WIN64) &&defined(x86_64)
|
||||||
isx86_Advan_ = false;
|
isx86_Advan_ = false;
|
||||||
|
@ -605,6 +606,7 @@ void hg_scanner::init_setting_func_map(void)
|
||||||
setting_map_[SANE_STD_OPT_NAME_SEARCH_HOLE_RANGE_B] = &hg_scanner::setting_isremove_low_hole_threshold;
|
setting_map_[SANE_STD_OPT_NAME_SEARCH_HOLE_RANGE_B] = &hg_scanner::setting_isremove_low_hole_threshold;
|
||||||
setting_map_[SANE_STD_OPT_NAME_FOLD_TYPE] = &hg_scanner::setting_fold_type;
|
setting_map_[SANE_STD_OPT_NAME_FOLD_TYPE] = &hg_scanner::setting_fold_type;
|
||||||
setting_map_[SANE_STD_OPT_NAME_COLOR_CORRECTION] = &hg_scanner::setting_color_correction;
|
setting_map_[SANE_STD_OPT_NAME_COLOR_CORRECTION] = &hg_scanner::setting_color_correction;
|
||||||
|
setting_map_[SANE_STD_OPT_NAME_WAIT_SCAN_EXIT] = &hg_scanner::setting_auto_paper_scan_exit_time;
|
||||||
}
|
}
|
||||||
std::string hg_scanner::setting_name_from(const char* n_or_id, int* id)
|
std::string hg_scanner::setting_name_from(const char* n_or_id, int* id)
|
||||||
{
|
{
|
||||||
|
@ -2246,6 +2248,11 @@ int hg_scanner::setting_color_correction(void* data)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
int hg_scanner::setting_auto_paper_scan_exit_time(void* data)
|
||||||
|
{
|
||||||
|
is_auto_paper_scan_exit_time = *((int*)data);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
int hg_scanner::on_color_mode_changed(int& color_mode)
|
int hg_scanner::on_color_mode_changed(int& color_mode)
|
||||||
{
|
{
|
||||||
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
|
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
|
||||||
|
|
|
@ -255,11 +255,13 @@ protected:
|
||||||
int setting_isremove_low_hole_threshold(void* data);
|
int setting_isremove_low_hole_threshold(void* data);
|
||||||
int setting_fold_type(void* data);
|
int setting_fold_type(void* data);
|
||||||
int setting_color_correction(void* data);
|
int setting_color_correction(void* data);
|
||||||
|
int setting_auto_paper_scan_exit_time(void* data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual void on_device_reconnected(void);
|
virtual void on_device_reconnected(void);
|
||||||
virtual int on_scanner_closing(bool force);
|
virtual int on_scanner_closing(bool force);
|
||||||
|
|
||||||
|
|
||||||
virtual int on_color_mode_changed(int& color_mode) = 0; // COLOR_MODE_xxx
|
virtual int on_color_mode_changed(int& color_mode) = 0; // COLOR_MODE_xxx
|
||||||
virtual int on_paper_changed(int& paper) = 0; // PAPER_xxx
|
virtual int on_paper_changed(int& paper) = 0; // PAPER_xxx
|
||||||
virtual int on_paper_check_changed(bool& check)=0;
|
virtual int on_paper_check_changed(bool& check)=0;
|
||||||
|
@ -352,6 +354,7 @@ protected:
|
||||||
float save_dpi_color_check_val; //保存纵向DPI、色差检测 ,畸变自动计算 的值
|
float save_dpi_color_check_val; //保存纵向DPI、色差检测 ,畸变自动计算 的值
|
||||||
bool is_auto_falt; //是否进行平场校正
|
bool is_auto_falt; //是否进行平场校正
|
||||||
bool color_correction_; //是否色彩校正
|
bool color_correction_; //是否色彩校正
|
||||||
|
int is_auto_paper_scan_exit_time; //待纸扫描退出时间
|
||||||
|
|
||||||
SANE_DISTORTION_VAL distortion_val; //畸变修正结构体保存
|
SANE_DISTORTION_VAL distortion_val; //畸变修正结构体保存
|
||||||
|
|
||||||
|
@ -372,6 +375,9 @@ protected:
|
||||||
bool is_kernelsnap_3C_cccc; //支持偏色校正的版本,自适应配置
|
bool is_kernelsnap_3C_cccc; //支持偏色校正的版本,自适应配置
|
||||||
bool is_kernelsnap_220500_; //支持双张保留的版本
|
bool is_kernelsnap_220500_; //支持双张保留的版本
|
||||||
|
|
||||||
|
bool is_kernelsnap_211227_; //此版本以下,不支持真实dpi ,只设置1下去
|
||||||
|
|
||||||
|
|
||||||
SCANCONF img_conf_; //此参数外部不做任何改变,请在writedown_image_configuration做修改
|
SCANCONF img_conf_; //此参数外部不做任何改变,请在writedown_image_configuration做修改
|
||||||
std::string img_type_;
|
std::string img_type_;
|
||||||
|
|
||||||
|
@ -534,7 +540,7 @@ public:
|
||||||
#elif defined(OEM_ZHONGJING)
|
#elif defined(OEM_ZHONGJING)
|
||||||
static const std::string helpfile_ = "/opt/apps/com.microtekchina.microtekscan/entries/help/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
static const std::string helpfile_ = "/opt/apps/com.microtekchina.microtekscan/entries/help/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
||||||
#elif defined(OEM_ZIGUANG)
|
#elif defined(OEM_ZIGUANG)
|
||||||
static const std::string helpfile_ = "/opt/apps/com.unisgroup.uniscan/entries/help/UnisScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
static const std::string helpfile_ = "/opt/apps/com.unisgroup.uniscan/entries/help/UniScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
||||||
#else
|
#else
|
||||||
static const std::string helpfile_ ="/opt/apps/com.huagaochina.huagoscan/entries/help/HuaGoScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
static const std::string helpfile_ ="/opt/apps/com.huagaochina.huagoscan/entries/help/HuaGoScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
||||||
#endif
|
#endif
|
||||||
|
@ -548,7 +554,7 @@ public:
|
||||||
#elif defined(OEM_ZHONGJING)
|
#elif defined(OEM_ZHONGJING)
|
||||||
static const std::string helpfile_ = "/opt/apps/scanner-driver-microtek/doc/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
static const std::string helpfile_ = "/opt/apps/scanner-driver-microtek/doc/MicrotekScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
||||||
#elif defined(OEM_ZIGUANG)
|
#elif defined(OEM_ZIGUANG)
|
||||||
static const std::string helpfile_ = "/opt/apps/scanner-driver-unis/doc/UnisScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
static const std::string helpfile_ = "/opt/apps/scanner-driver-unis/doc/UniScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
||||||
#else
|
#else
|
||||||
static const std::string helpfile_ ="/opt/apps/scanner-driver-huagao/doc/HuaGoScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
static const std::string helpfile_ ="/opt/apps/scanner-driver-huagao/doc/HuaGoScan_scanSettings_Help_manual.pdf";//帮助文档路径
|
||||||
#endif
|
#endif
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -379,7 +379,9 @@ namespace hg_imgproc
|
||||||
#elif defined(OEM_CANGTIAN)
|
#elif defined(OEM_CANGTIAN)
|
||||||
string libname = "libctsdriver.so";
|
string libname = "libctsdriver.so";
|
||||||
#elif defined(OEM_ZHONGJING)
|
#elif defined(OEM_ZHONGJING)
|
||||||
string libname = "libzjdriver.so";
|
string libname = "libzjdriver.so";.
|
||||||
|
#elif defined(OEM_ZIGUANG)
|
||||||
|
string libname = "libzgdriver.so";
|
||||||
#else
|
#else
|
||||||
string libname = "libhgdriver.so";
|
string libname = "libhgdriver.so";
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue