添加照片模式配置项;如果能够成功获取到则恢复显示IP

This commit is contained in:
gb 2022-07-25 10:38:20 +08:00
parent 9464e3a194
commit 667a6edec7
7 changed files with 65 additions and 30 deletions

View File

@ -56,7 +56,11 @@ typedef union hg_scanner_config
unsigned int screw_detect_level : 3; // 歪斜检测水平 unsigned int screw_detect_level : 3; // 歪斜检测水平
unsigned int iscorrect_mod : 1; // 是否自动校正 unsigned int iscorrect_mod : 1; // 是否自动校正
unsigned int is_autopaper : 1; // 是否自动进纸 unsigned int is_autopaper : 1; // 是否自动进纸
unsigned int reserved1 : 4; // 保留 // unsigned int reserved1 : 4; // 保留
unsigned int is_textcorrect : 1; // 0 - 照片模式1 - 文本模式。默认值为 1
unsigned int is_fixedpaper : 1; //
unsigned int en_anlogic_key : 1; //
unsigned int en_autosize : 1; //
unsigned int pc_correct : 1; // 是否在PC端校正 unsigned int pc_correct : 1; // 是否在PC端校正
unsigned int enable_sizecheck : 1; // 是否进行尺寸检测 unsigned int enable_sizecheck : 1; // 是否进行尺寸检测
unsigned int enabledsp_cache : 1; // 是否在片上缓存 unsigned int enabledsp_cache : 1; // 是否在片上缓存
@ -87,16 +91,31 @@ typedef union hg_scanner_config_dsp
typedef union hg_scanner_config_G400 typedef union hg_scanner_config_G400
{ {
unsigned int value; unsigned int value;
struct //struct
//{
// unsigned int pageSize : 5;
// unsigned int isColor : 1;
// unsigned int dpi : 2;
// unsigned int doubleFeeded : 1;
// unsigned int enableUV : 1;
// unsigned int enableLed : 1;
// unsigned int sizedetece : 1;
// unsigned int reversed1 : 5;
// unsigned int isCorrect : 1;
// unsigned int dstHeight : 8;
// unsigned int reversed2 : 6;
//}params;
struct // changed on 2022-07-25
{ {
unsigned int pageSize : 5; unsigned int pageSize : 5;
unsigned int isColor : 1; unsigned int isColor : 1;
unsigned int dpi : 2; unsigned int dpi : 2;
unsigned int doubleFeeded : 1; unsigned int doubleFeeded : 1;
unsigned int enableUV : 1; unsigned int enableStable : 1;
unsigned int enableLed : 1; unsigned int enableLed : 1;
unsigned int sizedetece : 1; unsigned int enableSizeDetect : 1;
unsigned int reversed1 : 5; unsigned int lutmode : 1; // 设置文本和照片模式, 0 - 文本1 - 照片。默认值为“0”
unsigned int reversed1 : 4;
unsigned int isCorrect : 1; unsigned int isCorrect : 1;
unsigned int dstHeight : 8; unsigned int dstHeight : 8;
unsigned int reversed2 : 6; unsigned int reversed2 : 6;

View File

@ -352,6 +352,8 @@ void hg_scanner::set_setting_map(int sn, const char* title)
setting_map_[sn] = &hg_scanner::setting_color_fill; setting_map_[sn] = &hg_scanner::setting_color_fill;
else if(val == OPTION_TITLE_HBTXYZ) else if(val == OPTION_TITLE_HBTXYZ)
setting_map_[sn] = &hg_scanner::setting_black_white_threshold; setting_map_[sn] = &hg_scanner::setting_black_white_threshold;
else if(val == OPTION_TITLE_ZPMS)
setting_map_[sn] = &hg_scanner::setting_keep_watermark;
} }
void hg_scanner::thread_handle_usb(void) void hg_scanner::thread_handle_usb(void)
{ {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -438,7 +438,9 @@ scanner_err hg_scanner_mgr::get_about_info(scanner_handle h, void* data, unsigne
{ {
set_appendix_info_for_about(about, ptr, count, BRAND_TITLE_FIRM_VERSION, scanner->get_firmware_version().c_str(), NULL); set_appendix_info_for_about(about, ptr, count, BRAND_TITLE_FIRM_VERSION, scanner->get_firmware_version().c_str(), NULL);
set_appendix_info_for_about(about, ptr, count, BRAND_TITLE_SERIAL_NUM, scanner->get_serial_num().c_str(), NULL); set_appendix_info_for_about(about, ptr, count, BRAND_TITLE_SERIAL_NUM, scanner->get_serial_num().c_str(), NULL);
//set_appendix_info_for_about(about, ptr, count, BRAND_TITLE_IP, scanner->get_ip().c_str(), NULL); info = scanner->get_ip();
if(info.length())
set_appendix_info_for_about(about, ptr, count, BRAND_TITLE_IP, info.c_str(), NULL);
rolls = scanner->get_roller_num(); rolls = scanner->get_roller_num();
if (rolls >= 0) if (rolls >= 0)
{ {