mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 22:17:31 +00:00
automatic driver installation on Windows using WCID, changed PID to avoid collision
This commit is contained in:
parent
4cbd60e62d
commit
2d44201de7
11 changed files with 512 additions and 873 deletions
|
|
@ -263,8 +263,15 @@ void Device::SearchDevices(std::function<bool (libusb_device_handle *, QString)>
|
|||
continue;
|
||||
}
|
||||
|
||||
if (desc.idVendor != VID || desc.idProduct != PID) {
|
||||
/* Not the correct IDs */
|
||||
bool correctID = false;
|
||||
int numIDs = sizeof(IDs)/sizeof(IDs[0]);
|
||||
for(int i=0;i<numIDs;i++) {
|
||||
if(desc.idVendor == IDs[i].VID && desc.idProduct == IDs[i].PID) {
|
||||
correctID = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!correctID) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,8 +82,14 @@ private slots:
|
|||
}
|
||||
|
||||
private:
|
||||
static constexpr int VID = 0x0483;
|
||||
static constexpr int PID = 0x564e;
|
||||
using USBID = struct {
|
||||
int VID;
|
||||
int PID;
|
||||
};
|
||||
static constexpr USBID IDs[] = {
|
||||
{0x0483, 0x5640},
|
||||
{0x0483, 0x4121},
|
||||
};
|
||||
static constexpr int EP_Data_Out_Addr = 0x01;
|
||||
static constexpr int EP_Data_In_Addr = 0x81;
|
||||
static constexpr int EP_Log_In_Addr = 0x82;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue