Merge branch 'dev' of http://192.168.10.5:8099/sane/code_device into dev
This commit is contained in:
commit
dd04befa07
|
@ -290,8 +290,11 @@ int hg_scanner_200::start(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
USBCB usb = { setting3288dsp::START_COMMAND, img_conf_.scannum, 0 };
|
USBCB usb = { setting3288dsp::START_COMMAND, img_conf_.scannum, 0 };
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(io_lock_);
|
||||||
ret = writeusb(usb);
|
ret = writeusb(usb);
|
||||||
io_->set_timeout(500);
|
io_->set_timeout(500);
|
||||||
|
}
|
||||||
VLOG_MINI_1(LOG_LEVEL_WARNING, "write start command = %s\n", hg_scanner_err_name(ret));
|
VLOG_MINI_1(LOG_LEVEL_WARNING, "write start command = %s\n", hg_scanner_err_name(ret));
|
||||||
|
|
||||||
if(ret == SCANNER_ERR_OK)
|
if(ret == SCANNER_ERR_OK)
|
||||||
|
@ -311,8 +314,10 @@ int hg_scanner_200::stop(void)
|
||||||
int ret = SCANNER_ERR_OK;
|
int ret = SCANNER_ERR_OK;
|
||||||
|
|
||||||
USBCB usbcb = { setting3288dsp::STOP, 0, 0};
|
USBCB usbcb = { setting3288dsp::STOP, 0, 0};
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(io_lock_);
|
||||||
ret = writeusb(usbcb);
|
ret = writeusb(usbcb);
|
||||||
|
}
|
||||||
user_cancel_ = true;
|
user_cancel_ = true;
|
||||||
if (ret == SCANNER_ERR_DEVICE_BUSY)
|
if (ret == SCANNER_ERR_DEVICE_BUSY)
|
||||||
{
|
{
|
||||||
|
@ -972,7 +977,12 @@ int hg_scanner_200::set_auto_flat(int data)
|
||||||
{
|
{
|
||||||
USBCB usbcb = { setting3288dsp::START_FLAT,data,0 };
|
USBCB usbcb = { setting3288dsp::START_FLAT,data,0 };
|
||||||
int len = sizeof(usbcb);
|
int len = sizeof(usbcb);
|
||||||
int ret = writeusb(usbcb);
|
int ret = SCANNER_ERR_OK;
|
||||||
|
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(io_lock_);
|
||||||
|
ret = writeusb(usbcb);
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == SCANNER_ERR_OK)
|
if (ret == SCANNER_ERR_OK)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue