Merge branch 'master' of github.com:jankae/LibreVNA
This commit is contained in:
commit
4568be8ff4
@ -174,7 +174,7 @@ static constexpr Protocol::DeviceStatusV1 defaultStatusV1 = {
|
|||||||
.temp_MCU = 0,
|
.temp_MCU = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
Device::Device(QString serial)
|
Device::Device(QString serial, bool ignoreOpenError)
|
||||||
{
|
{
|
||||||
info = defaultInfo;
|
info = defaultInfo;
|
||||||
status = {};
|
status = {};
|
||||||
@ -197,7 +197,7 @@ Device::Device(QString serial)
|
|||||||
// not the requested device, continue search
|
// not the requested device, continue search
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}, m_context, false);
|
}, m_context, ignoreOpenError);
|
||||||
|
|
||||||
if(!m_handle) {
|
if(!m_handle) {
|
||||||
QString message = "No device found";
|
QString message = "No device found";
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
Q_ENUM(TransmissionResult)
|
Q_ENUM(TransmissionResult)
|
||||||
|
|
||||||
// connect to a VNA device. If serial is specified only connecting to this device, otherwise to the first one found
|
// 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();
|
~Device();
|
||||||
|
|
||||||
static void RegisterTypes();
|
static void RegisterTypes();
|
||||||
|
@ -138,7 +138,7 @@ VirtualDevice::VirtualDevice(QString serial)
|
|||||||
} else {
|
} else {
|
||||||
// Connect to the actual devices
|
// Connect to the actual devices
|
||||||
for(auto devSerial : cdev->deviceSerials) {
|
for(auto devSerial : cdev->deviceSerials) {
|
||||||
auto dev = new Device(devSerial);
|
auto dev = new Device(devSerial, true);
|
||||||
devices.push_back(dev);
|
devices.push_back(dev);
|
||||||
// Create device connections
|
// Create device connections
|
||||||
connect(dev, &Device::ConnectionLost, this, &VirtualDevice::ConnectionLost, Qt::QueuedConnection);
|
connect(dev, &Device::ConnectionLost, this, &VirtualDevice::ConnectionLost, Qt::QueuedConnection);
|
||||||
|
@ -152,6 +152,7 @@ void Trace::addData(const Trace::Data &d, const VirtualDevice::SASettings &s, in
|
|||||||
|
|
||||||
void Trace::addDeembeddingData(const Trace::Data &d, int index)
|
void Trace::addDeembeddingData(const Trace::Data &d, int index)
|
||||||
{
|
{
|
||||||
|
bool wasAvailable = deembeddingAvailable();
|
||||||
if(index >= 0) {
|
if(index >= 0) {
|
||||||
// index position specified
|
// index position specified
|
||||||
if(deembeddingData.size() <= (unsigned int) index) {
|
if(deembeddingData.size() <= (unsigned int) index) {
|
||||||
@ -180,7 +181,9 @@ void Trace::addDeembeddingData(const Trace::Data &d, int index)
|
|||||||
if(deembeddingActive) {
|
if(deembeddingActive) {
|
||||||
emit outputSamplesChanged(index, index + 1);
|
emit outputSamplesChanged(index, index + 1);
|
||||||
}
|
}
|
||||||
emit deembeddingChanged();
|
if(!wasAvailable) {
|
||||||
|
emit deembeddingChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Trace::setName(QString name) {
|
void Trace::setName(QString name) {
|
||||||
@ -1317,7 +1320,6 @@ void Trace::setDeembeddingActive(bool active)
|
|||||||
|
|
||||||
void Trace::clearDeembedding()
|
void Trace::clearDeembedding()
|
||||||
{
|
{
|
||||||
setDeembeddingActive(false);
|
|
||||||
deembeddingData.clear();
|
deembeddingData.clear();
|
||||||
deembeddingChanged();
|
deembeddingChanged();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user