diff --git a/hgdriver/hgdev/hg_scanner_239.cpp b/hgdriver/hgdev/hg_scanner_239.cpp index 7829dd2..c83470e 100644 --- a/hgdriver/hgdev/hg_scanner_239.cpp +++ b/hgdriver/hgdev/hg_scanner_239.cpp @@ -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 lock(io_lock_); - while (ret == SCANNER_ERR_OK) - { - ret = io_->read_bulk(&str[0], &block); - } - } + //{ + // std::lock_guard lock(io_lock_); + // while (ret == SCANNER_ERR_OK) + // { + // ret = io_->read_bulk(&str[0], &block); + // } + //} char buf[64]; int size = sizeof(buf);