删除G239再打开设备的时候去唤醒设备,因为有的设备不支持

This commit is contained in:
13038267101 2023-04-14 17:26:05 +08:00
parent 29995bc662
commit 74ccee0ee4
1 changed files with 7 additions and 27 deletions

View File

@ -403,26 +403,6 @@ int hg_scanner_239::get_front_data_size(void)
}
void hg_scanner_239::init_version(void)
{
int val = 0,
ret = SCANNER_ERR_OK;
int cnt = 0;
while (!val)
{
cnt++;
ret = get_scan_is_sleep(val);
if (!val && ret == SCANNER_ERR_OK)
{
ret = set_notify_sleep();
status_ = SCANNER_ERR_DEVICE_SLEEPING;
}
if (cnt > 5)
{
break;
}
this_thread::sleep_for(chrono::milliseconds(800));
}
std::string fv(get_firmware_version()),
sn(get_serial_num());
if (fv.empty() || sn.empty())
@ -704,13 +684,13 @@ int hg_scanner_239::discard_all_images(void)
ret = SCANNER_ERR_OK;
string str;
str.resize(block);
{
std::lock_guard<std::mutex> lock(io_lock_);
while (ret == SCANNER_ERR_OK)
{
ret = io_->read_bulk(&str[0], &block);
}
}
//{
// std::lock_guard<std::mutex> lock(io_lock_);
// while (ret == SCANNER_ERR_OK)
// {
// ret = io_->read_bulk(&str[0], &block);
// }
//}
char buf[64];
int size = sizeof(buf);