From e7b06c0c2aa42cb5a268d157341398ef12535072 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Fri, 16 Jun 2023 17:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B9=B3=E5=9C=BA=E6=A0=A1?= =?UTF-8?q?=E6=AD=A3=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/hg_scanner_239.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hgdriver/hgdev/hg_scanner_239.cpp b/hgdriver/hgdev/hg_scanner_239.cpp index 489884c..0e1a29b 100644 --- a/hgdriver/hgdev/hg_scanner_239.cpp +++ b/hgdriver/hgdev/hg_scanner_239.cpp @@ -1065,9 +1065,9 @@ void hg_scanner_239::thread_correction(void) } if (ret == SCANNER_ERR_TIMEOUT) { - if (sw.elapsed_s() > 30) + if (sw.elapsed_s() > 10) { - status_ = ret; + status_ = SCANNER_ERR_DEVICE_AUTO_FAIL_OVER; //notify_ui_working_status(hg_log::lang_load(ID_STATU_DESC_SCANNER_ERR_DEVICE_FAIL_OUTTIME), SANE_EVENT_ERROR, ret); // 通信超时 VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "设备校正超时 '%s'\n", hg_scanner_err_name(status_)); break; @@ -1079,6 +1079,7 @@ void hg_scanner_239::thread_correction(void) { if (setting3399::AutoCorrect ==info->From) { + std::lock_guard lock(io_lock_); status_ == SCANNER_ERR_DEVICE_AUTO_FAIL_INFO; sw.reset(); std::string sinfo;