清空图像队列,放到启动扫描之前
This commit is contained in:
parent
8e2401be4f
commit
f768977515
|
@ -1121,9 +1121,9 @@ void hg_scanner::working_begin(void*)
|
||||||
}
|
}
|
||||||
void hg_scanner::working_done(void*)
|
void hg_scanner::working_done(void*)
|
||||||
{
|
{
|
||||||
imgs_.Clear();
|
// imgs_.Clear(); // do before start ...
|
||||||
if(user_cancel_)
|
// if(user_cancel_)
|
||||||
final_imgs_.clear();
|
// final_imgs_.clear();
|
||||||
|
|
||||||
if (status_ == SCANNER_ERR_OK && stop_fatal_)
|
if (status_ == SCANNER_ERR_OK && stop_fatal_)
|
||||||
status_ = stop_fatal_;
|
status_ = stop_fatal_;
|
||||||
|
@ -5205,4 +5205,4 @@ int hg_scanner::image_configuration(SCANCONF& ic)
|
||||||
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "ic.is_colorcast =%d\r\n", ic.is_colorcast);
|
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "ic.is_colorcast =%d\r\n", ic.is_colorcast);
|
||||||
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "ic.isuoloadexceptionimage=%d\r\n", ic.isuoloadexceptionimage);
|
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "ic.isuoloadexceptionimage=%d\r\n", ic.isuoloadexceptionimage);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,6 +277,8 @@ int hg_scanner_200::start(void)
|
||||||
|
|
||||||
//discard_prev();
|
//discard_prev();
|
||||||
user_cancel_ = false;
|
user_cancel_ = false;
|
||||||
|
imgs_.Clear(); // move from scanning done
|
||||||
|
final_imgs_.clear(); // move from scanning done
|
||||||
ret = writedown_device_configuration(true);
|
ret = writedown_device_configuration(true);
|
||||||
if (ret == SCANNER_ERR_OK)
|
if (ret == SCANNER_ERR_OK)
|
||||||
writedown_image_configuration();
|
writedown_image_configuration();
|
||||||
|
@ -1052,4 +1054,4 @@ int hg_scanner_200::get_roller_num(int& val)
|
||||||
}
|
}
|
||||||
val = usbcb.u32_Data;
|
val = usbcb.u32_Data;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1486,6 +1486,7 @@ int hg_scanner_239::stop(void)
|
||||||
}
|
}
|
||||||
int hg_scanner_239::reset(void)
|
int hg_scanner_239::reset(void)
|
||||||
{
|
{
|
||||||
|
imgs_.Clear(); // move from scanning done
|
||||||
final_imgs_.clear();
|
final_imgs_.clear();
|
||||||
discard_all_images();
|
discard_all_images();
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,8 @@ int hg_scanner_300::start(void)
|
||||||
if (handled)
|
if (handled)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
final_imgs_.clear();
|
final_imgs_.clear();
|
||||||
|
imgs_.Clear(); // move from scanning done
|
||||||
|
|
||||||
//if (is_read_int)
|
//if (is_read_int)
|
||||||
//{
|
//{
|
||||||
|
@ -387,6 +388,7 @@ int hg_scanner_300::stop(void)
|
||||||
std::lock_guard<std::mutex> lock(io_lock_);
|
std::lock_guard<std::mutex> lock(io_lock_);
|
||||||
ret = writeusb(usbcb);
|
ret = writeusb(usbcb);
|
||||||
}
|
}
|
||||||
|
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "Write stop command = %d\n", ret);
|
||||||
|
|
||||||
if (status_ == SCANNER_ERR_DEVICE_BUSY)
|
if (status_ == SCANNER_ERR_DEVICE_BUSY)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1126,7 +1126,8 @@ int hg_scanner_302::stop(void)
|
||||||
}
|
}
|
||||||
int hg_scanner_302::reset(void)
|
int hg_scanner_302::reset(void)
|
||||||
{
|
{
|
||||||
final_imgs_.clear();
|
imgs_.Clear(); // move from scanning done
|
||||||
|
final_imgs_.clear();
|
||||||
discard_all_images();
|
discard_all_images();
|
||||||
|
|
||||||
return status_;
|
return status_;
|
||||||
|
@ -1395,4 +1396,4 @@ int hg_scanner_302::get_history_scan_count(int& val)
|
||||||
std::lock_guard<std::mutex> lock(io_lock_);
|
std::lock_guard<std::mutex> lock(io_lock_);
|
||||||
int ret = read_register(setting3399::SR_GET_SCANN_NUM, &val);
|
int ret = read_register(setting3399::SR_GET_SCANN_NUM, &val);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue