Prevent error message when connecting to compound device on Windows
This commit is contained in:
parent
8778d82576
commit
0c3046b9c7
@ -174,7 +174,7 @@ static constexpr Protocol::DeviceStatusV1 defaultStatusV1 = {
|
||||
.temp_MCU = 0,
|
||||
};
|
||||
|
||||
Device::Device(QString serial)
|
||||
Device::Device(QString serial, bool ignoreOpenError)
|
||||
{
|
||||
info = defaultInfo;
|
||||
status = {};
|
||||
@ -197,7 +197,7 @@ Device::Device(QString serial)
|
||||
// not the requested device, continue search
|
||||
return true;
|
||||
}
|
||||
}, m_context, false);
|
||||
}, m_context, ignoreOpenError);
|
||||
|
||||
if(!m_handle) {
|
||||
QString message = "No device found";
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
Q_ENUM(TransmissionResult)
|
||||
|
||||
// connect to a VNA device. If serial is specified only connecting to this device, otherwise to the first one found
|
||||
Device(QString serial = QString());
|
||||
Device(QString serial = QString(), bool ignoreOpenError = false);
|
||||
~Device();
|
||||
|
||||
static void RegisterTypes();
|
||||
|
@ -138,7 +138,7 @@ VirtualDevice::VirtualDevice(QString serial)
|
||||
} else {
|
||||
// Connect to the actual devices
|
||||
for(auto devSerial : cdev->deviceSerials) {
|
||||
auto dev = new Device(devSerial);
|
||||
auto dev = new Device(devSerial, true);
|
||||
devices.push_back(dev);
|
||||
// Create device connections
|
||||
connect(dev, &Device::ConnectionLost, this, &VirtualDevice::ConnectionLost, Qt::QueuedConnection);
|
||||
|
Loading…
Reference in New Issue
Block a user