diff --git a/huagao/Device/GScanO400.cpp b/huagao/Device/GScanO400.cpp index c195a151..4c3b0893 100644 --- a/huagao/Device/GScanO400.cpp +++ b/huagao/Device/GScanO400.cpp @@ -310,7 +310,6 @@ BOOL GScanO400::Get_Scanner_PaperOn() if (!(m_usb.get() && m_usb->is_open())) return false; USBCB usbcb = { GET_PAPER_STATUS ,0,0 }; - usbcb.u32_Data = 1; std::lock_guard lck(m_imgLocker); m_usb->write_bulk(&usbcb, sizeof(usbcb)); if (m_usb.get() && m_usb->is_connected()) { diff --git a/huagao/Device/ImageMatQueue.cpp b/huagao/Device/ImageMatQueue.cpp index 0126f8b3..f34a91f7 100644 --- a/huagao/Device/ImageMatQueue.cpp +++ b/huagao/Device/ImageMatQueue.cpp @@ -6,7 +6,7 @@ #include "filetools.h" #include #include "StopWatch.h" -#include "JpegBuffer.h" +//#include "JpegBuffer.h" using namespace cv; using namespace std; diff --git a/huagao/Device/ImageMatQueue.h b/huagao/Device/ImageMatQueue.h index 55d4edbe..374f46a5 100644 --- a/huagao/Device/ImageMatQueue.h +++ b/huagao/Device/ImageMatQueue.h @@ -6,7 +6,7 @@ #include "PublicFunc.h" #include "BlockingQueue.h" #include -#include "threadpool.hpp" +//#include "threadpool.hpp" #include "PaperSize.h" #include "filetools.h" @@ -62,7 +62,8 @@ private: class Mat2BmpBw :public IMat2Bmp { public: Mat2BmpBw(const cv::Mat& mat,float res) { - + //static int indeximg = 0; + //cv::imwrite("D:\\" + to_string(++indeximg) + ".jpg", mat); m_data = std::shared_ptr>(new std::vector()); int headsize = 62; int width = mat.cols; diff --git a/huagao/Device/UsbScanEx.cpp b/huagao/Device/UsbScanEx.cpp index 511395b4..5c596329 100644 --- a/huagao/Device/UsbScanEx.cpp +++ b/huagao/Device/UsbScanEx.cpp @@ -164,14 +164,9 @@ int UsbScanEx::read_bulk(void* data, int len) int error_code = GetLastError(); switch (error_code) { - case ERROR_IO_PENDING: { - int re = GetOverlappedResult(h_pipe, lp_overlap, &pdw_ret, TRUE); - if (0 != re) - { - return pdw_ret; - } - error_code = GetLastError(); - } + case ERROR_IO_PENDING: + GetOverlappedResult(h_pipe, lp_overlap, &pdw_ret, TRUE); + return pdw_ret; case ERROR_FILE_NOT_FOUND: case ERROR_ACCESS_DENIED: m_b_is_connected = false; @@ -206,10 +201,9 @@ int UsbScanEx::write_bulk(void* data, int len) int errorcode = GetLastError(); switch (errorcode) { - case ERROR_IO_PENDING: { - if (0 != GetOverlappedResult(h_pipe, lp_overlap, &dw_size, TRUE)) - return dw_size; - } + case ERROR_IO_PENDING: + GetOverlappedResult(h_pipe, lp_overlap, &dw_size, TRUE); + return dw_size; case ERROR_FILE_NOT_FOUND: case ERROR_ACCESS_DENIED: m_b_is_connected = false;