diff --git a/huagao/Device/GScanO200.cpp b/huagao/Device/GScanO200.cpp index 3fbed4ea..83c52a80 100644 --- a/huagao/Device/GScanO200.cpp +++ b/huagao/Device/GScanO200.cpp @@ -312,6 +312,7 @@ void GScanO200::usbmain() case HAVE_IMAGE: { int totalNum = usbcb.u32_Count; + m_usb->set_timeout(1500); imgData = Get_Img_Data(totalNum); if (!imgData->size()) { Stop_scan(); @@ -323,6 +324,7 @@ void GScanO200::usbmain() static int rawdataindex = 0; FileTools::write_log("out.txt", "Enquque rawbuffer index " + std::to_string(++rawdataindex)); #endif // LOG + m_usb->set_timeout(200); Pop_Image(); break; } @@ -370,7 +372,7 @@ std::shared_ptr> GScanO200::Get_Img_Data(int bufferSize) std::shared_ptr> imData(new std::vector(bufferSize)); StopWatch sw; int readed = 0; - while (readed < bufferSize && sw.elapsed_ms() < 3000){ + while (readed < bufferSize && sw.elapsed_ms() < 5000){ USBCB usbcb = { GET_IMAGE,0,(UINT32)bufferSize }; m_usb->write_bulk(&usbcb, sizeof(usbcb)); readed = m_usb->read_bulk(imData->data(), bufferSize);