From 52cb2433100c526dcf77e7f3bdc99939b60bf5f7 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Wed, 14 Jun 2023 10:32:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/common_setting.h | 2 +- hgdriver/hgdev/hg_scanner.cpp | 14 +++----------- hgdriver/hgdev/hg_scanner_302.cpp | 9 +-------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/hgdriver/hgdev/common_setting.h b/hgdriver/hgdev/common_setting.h index 965db7c..644e7e9 100644 --- a/hgdriver/hgdev/common_setting.h +++ b/hgdriver/hgdev/common_setting.h @@ -1370,7 +1370,7 @@ namespace setting3399 #define IMGPRC_LIBNANE "HGImgProc.dll" #define HGBASE_LIBNAME "HGBase.dll" #define HELP_PATH "HuaGoScan_scanSettings_Help_manual.pdf" - #define HELP_PATH_EN "" + #define HELP_PATH_EN "HuaGoScan_scanSettings_Help_manual_EN.pdf" #endif diff --git a/hgdriver/hgdev/hg_scanner.cpp b/hgdriver/hgdev/hg_scanner.cpp index a3438b1..518d9b5 100644 --- a/hgdriver/hgdev/hg_scanner.cpp +++ b/hgdriver/hgdev/hg_scanner.cpp @@ -1419,24 +1419,16 @@ int hg_scanner::setting_restore(void* data, long* len) } int hg_scanner::setting_help(void* data, long* len) { - string scanner_path = hg_log::get_module_full_path(LIBNAME); std::string helpfile = HELP_PATH; std::string com = "xdg-open ";//注意空格保留 int code_page = lang_get_cur_code_page(); int ret = SCANNER_ERR_OK; - if (scanner_path.empty()) - { - return SCANNER_ERR_DEVICE_NOT_SUPPORT; - } - if (code_page == 20127) { helpfile = HELP_PATH_EN; } - helpfile = scanner_path.substr(0, scanner_path.size() - strlen(LIBNAME)) + helpfile; - printf("helpfile = %s\r\n", helpfile.c_str()); - + #if defined(WIN32) || defined(_WIN64) com = ""; helpfile.insert(0, hg_log::get_scanner_path()); @@ -1448,7 +1440,7 @@ int hg_scanner::setting_help(void* data, long* len) if (access(helpfile.c_str(),F_OK) == -1) #endif { - VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO,"App_Help_pdf path is:%s system is:%d\r\n",helpfile.c_str()); + VLOG_MINI_2(LOG_LEVEL_DEBUG_INFO,"open help file fail,not find file :%d code page :%d\r\n",helpfile.c_str(), code_page); ret = SCANNER_ERR_OPEN_FILE_FAILED; return ret ; } @@ -1459,7 +1451,7 @@ int hg_scanner::setting_help(void* data, long* len) #else system(com.c_str()); #endif - VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO,"App_Help_pdf path is:%s \n",helpfile.c_str()); + VLOG_MINI_2(LOG_LEVEL_DEBUG_INFO,"App_Help_pdf Path is:%s Code Page is:%d\n",helpfile.c_str(), code_page); return ret; } int hg_scanner::setting_color_mode(void* data, long* len) diff --git a/hgdriver/hgdev/hg_scanner_302.cpp b/hgdriver/hgdev/hg_scanner_302.cpp index b291256..0e6d329 100644 --- a/hgdriver/hgdev/hg_scanner_302.cpp +++ b/hgdriver/hgdev/hg_scanner_302.cpp @@ -1049,16 +1049,9 @@ int hg_scanner_302::start(void) split3399_ = 0; cb_mem_ = true; VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "scanner status: 0x%x\n", get_status()); - //notify_ui_working_status(STATU_DESC_PREPARE_START); reset(); - //read_register(setting3399::SR_GET_PAPERON, &val); - //if (!val) - //{ - // VLOG_MINI_1(LOG_LEVEL_WARNING, "start failed: %s\n", hg_scanner_err_name(SCANNER_ERR_DEVICE_NO_PAPER)); - // return SCANNER_ERR_DEVICE_NO_PAPER; - //} - //notify_ui_working_status(STATU_DESC_REWRITE_CONFIGURATION); + ret = writedown_device_configuration(true); if (ret == SCANNER_ERR_OK) writedown_image_configuration();