mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-958: WINDOWS HACK: do not filter out the bl.
This commit is contained in:
parent
660a175a53
commit
afeeed6f65
@ -131,7 +131,8 @@ QList<USBPortInfo> USBMonitor::availableDevices(int vid, int pid, int bcdDeviceM
|
||||
#define TCHARToQString(x) QString::fromLocal8Bit((x))
|
||||
#define TCHARToQStringN(x, y) QString::fromLocal8Bit((x), (y))
|
||||
#endif /*UNICODE*/
|
||||
#define HIDMATCHSTRING "COL01"
|
||||
#define MATCHOPHIDSTRING "COL01"
|
||||
#define MATCHOPBLSTRING "161A0549"
|
||||
|
||||
void USBMonitor::setUpNotifications()
|
||||
{
|
||||
@ -194,7 +195,8 @@ bool USBMonitor::matchAndDispatchChangedDevice(const QString & deviceID, const G
|
||||
DWORD nSize = 0;
|
||||
TCHAR buf[MAX_PATH];
|
||||
if (SetupDiGetDeviceInstanceId(devInfo, &spDevInfoData, buf, MAX_PATH, &nSize) &&
|
||||
deviceID.contains(TCHARToQString(buf)) && deviceID.contains(HIDMATCHSTRING)) { // we found a match
|
||||
deviceID.contains(TCHARToQString(buf)) && (deviceID.contains(MATCHOPHIDSTRING) ||
|
||||
deviceID.contains(MATCHOPBLSTRING))) { // we found a match
|
||||
USBPortInfo info;
|
||||
info.devicePath = deviceID;
|
||||
if (wParam == DBT_DEVICEARRIVAL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user