Debug-option: preserve phase for through measurements in compound driver
This commit is contained in:
parent
5e46055d3c
commit
f6ff4727c8
@ -31,6 +31,7 @@ CompoundDriver::CompoundDriver()
|
|||||||
|
|
||||||
specificSettings.push_back(Savable::SettingDescription(&compoundJSONString, "compoundDriver.compoundDeviceJSON", ""));
|
specificSettings.push_back(Savable::SettingDescription(&compoundJSONString, "compoundDriver.compoundDeviceJSON", ""));
|
||||||
specificSettings.push_back(Savable::SettingDescription(&captureRawReceiverValues, "compoundDriver.captureRawReceiverValues", false));
|
specificSettings.push_back(Savable::SettingDescription(&captureRawReceiverValues, "compoundDriver.captureRawReceiverValues", false));
|
||||||
|
specificSettings.push_back(Savable::SettingDescription(&preservePhase, "compoundDriver.preservePhase", false));
|
||||||
}
|
}
|
||||||
|
|
||||||
CompoundDriver::~CompoundDriver()
|
CompoundDriver::~CompoundDriver()
|
||||||
@ -212,11 +213,15 @@ QWidget *CompoundDriver::createSettingsWidget()
|
|||||||
|
|
||||||
// Set initial values
|
// Set initial values
|
||||||
ui->CaptureRawReceiverValues->setChecked(captureRawReceiverValues);
|
ui->CaptureRawReceiverValues->setChecked(captureRawReceiverValues);
|
||||||
|
ui->PreservePhase->setChecked(preservePhase);
|
||||||
|
|
||||||
// make connections
|
// make connections
|
||||||
connect(ui->CaptureRawReceiverValues, &QCheckBox::toggled, this, [=](){
|
connect(ui->CaptureRawReceiverValues, &QCheckBox::toggled, this, [=](){
|
||||||
captureRawReceiverValues = ui->CaptureRawReceiverValues->isChecked();
|
captureRawReceiverValues = ui->CaptureRawReceiverValues->isChecked();
|
||||||
});
|
});
|
||||||
|
connect(ui->PreservePhase, &QCheckBox::toggled, this, [=](){
|
||||||
|
preservePhase = ui->PreservePhase->isChecked();
|
||||||
|
});
|
||||||
|
|
||||||
connect(ui->compoundList, &QListWidget::doubleClicked, [=](){
|
connect(ui->compoundList, &QListWidget::doubleClicked, [=](){
|
||||||
auto index = ui->compoundList->currentRow();
|
auto index = ui->compoundList->currentRow();
|
||||||
@ -680,7 +685,7 @@ void CompoundDriver::datapointReceivecd(LibreVNADriver *dev, Protocol::VNADatapo
|
|||||||
// got both required measurements
|
// got both required measurements
|
||||||
QString name = "S"+QString::number(i+1)+QString::number(map.first);
|
QString name = "S"+QString::number(i+1)+QString::number(map.first);
|
||||||
auto S = input / ref;
|
auto S = input / ref;
|
||||||
if(inputDevice != stimulusDev) {
|
if(!preservePhase && (inputDevice != stimulusDev)) {
|
||||||
// can't use phase information when measuring across devices
|
// can't use phase information when measuring across devices
|
||||||
S = abs(S);
|
S = abs(S);
|
||||||
}
|
}
|
||||||
|
@ -203,6 +203,7 @@ private:
|
|||||||
|
|
||||||
// Driver specific settings
|
// Driver specific settings
|
||||||
bool captureRawReceiverValues;
|
bool captureRawReceiverValues;
|
||||||
|
bool preservePhase;
|
||||||
QString compoundJSONString;
|
QString compoundJSONString;
|
||||||
|
|
||||||
// Buffers for storing individual device answers
|
// Buffers for storing individual device answers
|
||||||
|
@ -75,6 +75,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="PreservePhase">
|
||||||
|
<property name="text">
|
||||||
|
<string>Preserve phase for measurements between devices</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user