调整普世 反馈退出 等待太久的时间 0439设备

This commit is contained in:
13038267101 2023-11-27 16:53:16 +08:00
parent 4c75e42f01
commit 0d2f75d070
1 changed files with 11 additions and 13 deletions

View File

@ -1442,15 +1442,21 @@ void hg_scanner_239::thread_get_dves_image(void)
if (!svdevs_err_.empty()) if (!svdevs_err_.empty())
{ {
status_ = svdevs_err_.front(); status_ = svdevs_err_.front();
svdevs_err_.clear();
} }
LOG_INFO(LOG_LEVEL_DEBUG_INFO, "received 'STOPSCAN' message in usb thread, check remaining image and finish scanning ...\n"); LOG_INFO(LOG_LEVEL_DEBUG_INFO, "received 'STOPSCAN' message in usb thread, check remaining image and finish scanning ...\n");
// fetch all buffered images and exit ... // fetch all buffered images and exit ...
//while(!is_dev_image_process_done()) //while(!is_dev_image_process_done())
if (img_conf_.resolution_dst > 200 && is_quality_ == IMG_QUALITY && pid_ != 0x439) //鍒犻櫎杩欐浠g爜锛屼綘鍙兘闇€瑕佽€冭檻涓€涓嬪悗鏋? //普世
if (pid_ != 0x439)
{
if (img_conf_.resolution_dst > 200 && is_quality_ == IMG_QUALITY) //鍒犻櫎杩欐浠g爜锛屼綘鍙兘闇€瑕佽€冭檻涓€涓嬪悗鏋?
std::this_thread::sleep_for(std::chrono::milliseconds(5000)); std::this_thread::sleep_for(std::chrono::milliseconds(5000));
else else
std::this_thread::sleep_for(std::chrono::milliseconds(500)); std::this_thread::sleep_for(std::chrono::milliseconds(500));
}
int rest = 0; int rest = 0;
while (get_image_count() > 0) while (get_image_count() > 0)
@ -1481,14 +1487,6 @@ void hg_scanner_239::thread_get_dves_image(void)
} }
if (count == 0) if (count == 0)
{ {
//std::lock_guard<std::mutex> lock(io_lock_);
//LOG_INFO(LOG_LEVEL_DEBUG_INFO, "First message received from USB is 'STOPSCAN'\n");
// notify_ui_working_status(STATU_DESC_DEVICE_RESET);
// reset_ = true;
// ret = io_->reset();
// status_ = SCANNER_ERR_IO;
if (status_ == SCANNER_ERR_DEVICE_STOPPED) if (status_ == SCANNER_ERR_DEVICE_STOPPED)
status_ = SCANNER_ERR_OK; status_ = SCANNER_ERR_OK;
} }
@ -1497,7 +1495,7 @@ void hg_scanner_239::thread_get_dves_image(void)
int s = get_status(); int s = get_status();
if (count == 0 || (s & 3) == 0) if ((count == 0 || (s & 3) == 0) || pid_ == 0x439)
{ {
LOG_INFO(LOG_LEVEL_DEBUG_INFO, "Really stopped ^_^\n"); LOG_INFO(LOG_LEVEL_DEBUG_INFO, "Really stopped ^_^\n");