From 52097e47e75344095dae86a048f84749ea661b0f Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Fri, 24 Nov 2023 15:45:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=BE=85=E7=BA=B8=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E6=9C=AA=E5=88=B0=E6=97=B6=E9=97=B4=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E6=8F=90=E5=89=8D=E6=8A=A5=E6=89=AB=E6=8F=8F=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E8=8E=B7=E5=8F=96=E5=9B=BE?= =?UTF-8?q?=E5=83=8F=E8=B6=85=E6=97=B660s=E6=94=B9=E4=B8=BA120s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/hg_scanner_239.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hgdriver/hgdev/hg_scanner_239.cpp b/hgdriver/hgdev/hg_scanner_239.cpp index 06b73a6..a6790df 100644 --- a/hgdriver/hgdev/hg_scanner_239.cpp +++ b/hgdriver/hgdev/hg_scanner_239.cpp @@ -1338,6 +1338,7 @@ void hg_scanner_239::thread_get_dves_image(void) svdevs_err_.clear(); StopWatch sw; + StopWatch sw1; bool is_quit_wait_paper_scan = false; while (run_)//&& !user_cancel_ @@ -1354,7 +1355,7 @@ void hg_scanner_239::thread_get_dves_image(void) if (ret == SCANNER_ERR_TIMEOUT) { std::this_thread::sleep_for(std::chrono::milliseconds(400)); - if (sw.elapsed_s() > 60 && !is_auto_scan()) + if (sw.elapsed_s() > 120 && !is_auto_scan()) { status_ = ret; notify_ui_working_status(from_default_language(STATU_DESC_SCANNER_ERR_DEVICE_GET_IMAGE_OUTTIME), SANE_EVENT_ERROR, ret); // 取图通信超时 @@ -1362,7 +1363,7 @@ void hg_scanner_239::thread_get_dves_image(void) break; } - if (is_auto_scan() && sw.elapsed_s() >= is_auto_paper_scan_exit_time && is_auto_paper_scan_exit_time != 0) + if (is_auto_scan() && sw1.elapsed_s() >= is_auto_paper_scan_exit_time && is_auto_paper_scan_exit_time != 0) { is_quit_wait_paper_scan = true;//标记待纸扫描时间到了自动结束 do_stop(); @@ -1504,7 +1505,10 @@ void hg_scanner_239::thread_get_dves_image(void) str += ":" + to_string(++auoto_paper_indx); if (!user_cancel_ && is_auto_scan() && svdevs_err_.empty() && !is_quit_wait_paper_scan) + { + sw1.reset(); notify_ui_working_status(str.c_str(), SANE_EVENT_ERROR, status_); + } else break; }