Merge branch 'dev' of http://192.168.10.5:8099/sane/code_device into dev
This commit is contained in:
commit
333d41699d
|
@ -160,6 +160,13 @@ hg_scanner_mgr::hg_scanner_mgr() : same_ind_(1), user_(""), pwd_(""), cf_name(""
|
||||||
}
|
}
|
||||||
hg_scanner_mgr::~hg_scanner_mgr()
|
hg_scanner_mgr::~hg_scanner_mgr()
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(mutex_dev_);
|
||||||
|
for (auto& v : online_devices_)
|
||||||
|
libusb_unref_device(v.dev);
|
||||||
|
online_devices_.clear();
|
||||||
|
}
|
||||||
|
|
||||||
usb_manager::clear();
|
usb_manager::clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,7 +373,7 @@ void hg_scanner_mgr::on_hgscanner_pnp(usb_event ev, libusb_device* device, int v
|
||||||
int index = -1;
|
int index = -1;
|
||||||
for (int i = 0; i < _countof(g_supporting_devices); ++i)
|
for (int i = 0; i < _countof(g_supporting_devices); ++i)
|
||||||
{
|
{
|
||||||
// 064B 澶氬彴璁惧浣跨敤杩欎釜vid锛屾墍浠ュ姞杞芥椂涓嶄細娓呮瑕佹墦寮€鍝竴鍙拌澶囷紝鍙湁閫氳繃澶栭儴杩涜鍔犺浇鏀瑰彉瀹炰緥
|
// 064B 婢舵艾褰寸拋鎯ь槵娴h法鏁ゆ潻娆庨嚋vid閿涘本澧嶆禒銉ュ<EFBFBD>鏉炶姤妞傛稉宥勭窗濞撳懏顨熺憰浣瑰ⅵ瀵<EFBFBD>偓閸濐亙绔撮崣鎷岊啎婢跺浄绱濋崣顏呮箒闁<EFBFBD>俺绻冩径鏍<EFBFBD>劥鏉╂稖顢戦崝鐘烘祰閺€鐟板綁鐎圭偘绶?
|
||||||
if (g_supporting_devices[i].vid == vid && g_supporting_devices[i].pid == pid)
|
if (g_supporting_devices[i].vid == vid && g_supporting_devices[i].pid == pid)
|
||||||
{
|
{
|
||||||
index = i;
|
index = i;
|
||||||
|
@ -401,7 +408,7 @@ void hg_scanner_mgr::on_hgscanner_pnp(usb_event ev, libusb_device* device, int v
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (add) // 澶勭悊瀵硅薄鈥渄evice鈥濇敼鍙樼殑鎯呮櫙
|
if (add) // 婢跺嫮鎮婄€电<EFBFBD>钖勯垾娓別vice閳ユ繃鏁奸崣妯兼畱閹<EFBFBD>懏娅?
|
||||||
{
|
{
|
||||||
i = 0;
|
i = 0;
|
||||||
for (auto& v : online_devices_)
|
for (auto& v : online_devices_)
|
||||||
|
|
Loading…
Reference in New Issue