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