Remember/set default values for signal generator/spectrum analyzer
This commit is contained in:
parent
5f654f0023
commit
978ac89aa9
Binary file not shown.
@ -314,7 +314,7 @@ The control elements are mostly identical to the vector network analyzer mode, a
|
|||||||
\end{center}
|
\end{center}
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item \textbf{RBW:} Resolution bandwidth. Lower values allow differentiating between signals at closer frequencies. Lower values also result in a reduced noisefloor but significantly increase sweep time.
|
\item \textbf{RBW:} Resolution bandwidth. Lower values allow differentiating between signals at closer frequencies. Lower values also result in a reduced noisefloor but significantly increase sweep time.
|
||||||
\item \textbf{Window:} Window type used in the DFT of the final IF. Can be left at "Kaiser" for almost all applications.
|
\item \textbf{Window:} Window type used in the DFT of the final IF.
|
||||||
\item \textbf{Detector:} For every point displayed, several measurements are taken. The detector type determines which one of these measurement will be displayed.
|
\item \textbf{Detector:} For every point displayed, several measurements are taken. The detector type determines which one of these measurement will be displayed.
|
||||||
\item \textbf{Signal ID:} Signal identification. This can help to determine whether a displayed signal is actually present or the result from internal imaging. When enabled, the \vna{} changes the LO frequencies for every measurement point and observes how the final IF signal is affected by that. This removes almost all of the mirror images but at the cost of increased sweep time.
|
\item \textbf{Signal ID:} Signal identification. This can help to determine whether a displayed signal is actually present or the result from internal imaging. When enabled, the \vna{} changes the LO frequencies for every measurement point and observes how the final IF signal is affected by that. This removes almost all of the mirror images but at the cost of increased sweep time.
|
||||||
|
|
||||||
|
@ -1,13 +1,35 @@
|
|||||||
#include "generator.h"
|
#include "generator.h"
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
Generator::Generator(AppWindow *window)
|
Generator::Generator(AppWindow *window)
|
||||||
: Mode(window, "Signal Generator")
|
: Mode(window, "Signal Generator")
|
||||||
{
|
{
|
||||||
central = new SignalgeneratorWidget();
|
central = new SignalgeneratorWidget();
|
||||||
|
|
||||||
|
// set initial values
|
||||||
|
if(pref.Startup.RememberSweepSettings) {
|
||||||
|
QSettings s;
|
||||||
|
central->setFrequency(s.value("GeneratorFrequency", pref.Startup.Generator.frequency).toDouble());
|
||||||
|
central->setLevel(s.value("GeneratorLevel", pref.Startup.Generator.level).toDouble());
|
||||||
|
} else {
|
||||||
|
central->setFrequency(pref.Startup.Generator.frequency);
|
||||||
|
central->setLevel(pref.Startup.Generator.level);
|
||||||
|
}
|
||||||
|
|
||||||
finalize(central);
|
finalize(central);
|
||||||
connect(central, &SignalgeneratorWidget::SettingsChanged, this, &Generator::updateDevice);
|
connect(central, &SignalgeneratorWidget::SettingsChanged, this, &Generator::updateDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Generator::deactivate()
|
||||||
|
{
|
||||||
|
// store current settings
|
||||||
|
QSettings s;
|
||||||
|
auto settings = central->getDeviceStatus();
|
||||||
|
s.setValue("GeneratorFrequency", static_cast<unsigned long long>(settings.frequency));
|
||||||
|
s.setValue("GeneratorLevel", static_cast<unsigned long long>((double) settings.cdbm_level / 100.0));
|
||||||
|
Mode::deactivate();
|
||||||
|
}
|
||||||
|
|
||||||
void Generator::initializeDevice()
|
void Generator::initializeDevice()
|
||||||
{
|
{
|
||||||
updateDevice();
|
updateDevice();
|
||||||
@ -16,7 +38,7 @@ void Generator::initializeDevice()
|
|||||||
void Generator::updateDevice()
|
void Generator::updateDevice()
|
||||||
{
|
{
|
||||||
if(!window->getDevice()) {
|
if(!window->getDevice()) {
|
||||||
// can't updat if not connected
|
// can't update if not connected
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO comment in once status is filled with valid values
|
// TODO comment in once status is filled with valid values
|
||||||
|
@ -8,6 +8,7 @@ class Generator : public Mode
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Generator(AppWindow *window);
|
Generator(AppWindow *window);
|
||||||
|
void deactivate() override;
|
||||||
void initializeDevice() override;
|
void initializeDevice() override;
|
||||||
private slots:
|
private slots:
|
||||||
void updateDevice();
|
void updateDevice();
|
||||||
|
@ -68,3 +68,8 @@ void SignalgeneratorWidget::setLevel(double level)
|
|||||||
SettingsChanged();
|
SettingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SignalgeneratorWidget::setFrequency(double frequency)
|
||||||
|
{
|
||||||
|
ui->frequency->setValue(frequency);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -21,8 +21,9 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void SettingsChanged();
|
void SettingsChanged();
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
void setLevel(double level);
|
void setLevel(double level);
|
||||||
|
void setFrequency(double frequency);
|
||||||
private:
|
private:
|
||||||
Ui::SignalgeneratorWidget *ui;
|
Ui::SignalgeneratorWidget *ui;
|
||||||
};
|
};
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
|
|
||||||
SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
|
SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
|
||||||
: Mode(window, "Spectrum Analyzer"),
|
: Mode(window, "Spectrum Analyzer"),
|
||||||
pref(window->getPreferenceRef()),
|
|
||||||
central(new TileWidget(traceModel))
|
central(new TileWidget(traceModel))
|
||||||
{
|
{
|
||||||
averages = 1;
|
averages = 1;
|
||||||
@ -130,7 +129,7 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
|
|||||||
tb_acq->addWidget(eBandwidth);
|
tb_acq->addWidget(eBandwidth);
|
||||||
|
|
||||||
tb_acq->addWidget(new QLabel("Window:"));
|
tb_acq->addWidget(new QLabel("Window:"));
|
||||||
auto cbWindowType = new QComboBox();
|
cbWindowType = new QComboBox();
|
||||||
cbWindowType->addItem("None");
|
cbWindowType->addItem("None");
|
||||||
cbWindowType->addItem("Kaiser");
|
cbWindowType->addItem("Kaiser");
|
||||||
cbWindowType->addItem("Hann");
|
cbWindowType->addItem("Hann");
|
||||||
@ -143,7 +142,7 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
|
|||||||
tb_acq->addWidget(cbWindowType);
|
tb_acq->addWidget(cbWindowType);
|
||||||
|
|
||||||
tb_acq->addWidget(new QLabel("Detector:"));
|
tb_acq->addWidget(new QLabel("Detector:"));
|
||||||
auto cbDetector = new QComboBox();
|
cbDetector = new QComboBox();
|
||||||
cbDetector->addItem("+Peak");
|
cbDetector->addItem("+Peak");
|
||||||
cbDetector->addItem("-Peak");
|
cbDetector->addItem("-Peak");
|
||||||
cbDetector->addItem("Sample");
|
cbDetector->addItem("Sample");
|
||||||
@ -156,7 +155,7 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
|
|||||||
});
|
});
|
||||||
tb_acq->addWidget(cbDetector);
|
tb_acq->addWidget(cbDetector);
|
||||||
|
|
||||||
auto cbSignalID = new QCheckBox("Signal ID");
|
cbSignalID = new QCheckBox("Signal ID");
|
||||||
connect(cbSignalID, &QCheckBox::toggled, [=](bool enabled) {
|
connect(cbSignalID, &QCheckBox::toggled, [=](bool enabled) {
|
||||||
settings.SignalID = enabled;
|
settings.SignalID = enabled;
|
||||||
SettingsChanged();
|
SettingsChanged();
|
||||||
@ -185,19 +184,18 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
|
|||||||
qRegisterMetaType<Protocol::SpectrumAnalyzerResult>("SpectrumResult");
|
qRegisterMetaType<Protocol::SpectrumAnalyzerResult>("SpectrumResult");
|
||||||
|
|
||||||
// Set initial sweep settings
|
// Set initial sweep settings
|
||||||
// TODO
|
if(pref.Startup.RememberSweepSettings) {
|
||||||
// if(pref.Startup.RememberSweepSettings) {
|
LoadSweepSettings();
|
||||||
// LoadSweepSettings();
|
} else {
|
||||||
// } else {
|
settings.f_start = pref.Startup.SA.start;
|
||||||
settings.f_start = 950000000;
|
settings.f_stop = pref.Startup.SA.stop;
|
||||||
settings.f_stop = 1050000000;
|
|
||||||
ConstrainAndUpdateFrequencies();
|
ConstrainAndUpdateFrequencies();
|
||||||
SetRBW(10000);
|
SetRBW(pref.Startup.SA.RBW);
|
||||||
settings.pointNum = 1001;
|
settings.pointNum = 1001;
|
||||||
settings.WindowType = 1;
|
cbWindowType->setCurrentIndex(pref.Startup.SA.window);
|
||||||
settings.Detector = 0;
|
cbDetector->setCurrentIndex(pref.Startup.SA.detector);
|
||||||
settings.SignalID = 0;
|
cbSignalID->setChecked(pref.Startup.SA.signalID);
|
||||||
// }
|
}
|
||||||
|
|
||||||
finalize(central);
|
finalize(central);
|
||||||
}
|
}
|
||||||
@ -365,23 +363,24 @@ void SpectrumAnalyzer::ConstrainAndUpdateFrequencies()
|
|||||||
|
|
||||||
void SpectrumAnalyzer::LoadSweepSettings()
|
void SpectrumAnalyzer::LoadSweepSettings()
|
||||||
{
|
{
|
||||||
// TODO
|
QSettings s;
|
||||||
// QSettings s;
|
settings.f_start = s.value("SAStart", pref.Startup.SA.start).toULongLong();
|
||||||
// settings.f_start = s.value("SweepStart", pref.Startup.DefaultSweep.start).toULongLong();
|
settings.f_stop = s.value("SAStop", pref.Startup.SA.stop).toULongLong();
|
||||||
// settings.f_stop = s.value("SweepStop", pref.Startup.DefaultSweep.stop).toULongLong();
|
ConstrainAndUpdateFrequencies();
|
||||||
// ConstrainAndUpdateFrequencies();
|
SetRBW(s.value("SARBW", pref.Startup.SA.RBW).toUInt());
|
||||||
// SetIFBandwidth(s.value("SweepBandwidth", pref.Startup.DefaultSweep.bandwidth).toUInt());
|
settings.pointNum = 1001;
|
||||||
// SetPoints(s.value("SweepPoints", pref.Startup.DefaultSweep.points).toInt());
|
cbWindowType->setCurrentIndex(s.value("SAWindow", pref.Startup.SA.window).toInt());
|
||||||
// SetSourceLevel(s.value("SweepLevel", pref.Startup.DefaultSweep.excitation).toDouble());
|
cbDetector->setCurrentIndex(s.value("SADetector", pref.Startup.SA.detector).toInt());
|
||||||
|
cbSignalID->setChecked(s.value("SASignalID", pref.Startup.SA.signalID).toBool());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpectrumAnalyzer::StoreSweepSettings()
|
void SpectrumAnalyzer::StoreSweepSettings()
|
||||||
{
|
{
|
||||||
// TODO
|
QSettings s;
|
||||||
// QSettings s;
|
s.setValue("SAStart", static_cast<unsigned long long>(settings.f_start));
|
||||||
// s.setValue("SweepStart", static_cast<unsigned long long>(settings.f_start));
|
s.setValue("SAStop", static_cast<unsigned long long>(settings.f_stop));
|
||||||
// s.setValue("SweepStop", static_cast<unsigned long long>(settings.f_stop));
|
s.setValue("SARBW", settings.RBW);
|
||||||
// s.setValue("SweepBandwidth", settings.if_bandwidth);
|
s.setValue("SAWindow", settings.WindowType);
|
||||||
// s.setValue("SweepPoints", settings.points);
|
s.setValue("SADetector", settings.Detector);
|
||||||
// s.setValue("SweepLevel", (double) settings.cdbm_excitation / 100.0);
|
s.setValue("SASignalID", static_cast<bool>(settings.SignalID));
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#include "appwindow.h"
|
#include "appwindow.h"
|
||||||
#include "mode.h"
|
#include "mode.h"
|
||||||
#include "CustomWidgets/tilewidget.h"
|
#include "CustomWidgets/tilewidget.h"
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QCheckBox>
|
||||||
|
|
||||||
class SpectrumAnalyzer : public Mode
|
class SpectrumAnalyzer : public Mode
|
||||||
{
|
{
|
||||||
@ -39,8 +41,6 @@ private:
|
|||||||
void LoadSweepSettings();
|
void LoadSweepSettings();
|
||||||
void StoreSweepSettings();
|
void StoreSweepSettings();
|
||||||
|
|
||||||
Preferences &pref;
|
|
||||||
|
|
||||||
Protocol::SpectrumAnalyzerSettings settings;
|
Protocol::SpectrumAnalyzerSettings settings;
|
||||||
unsigned int averages;
|
unsigned int averages;
|
||||||
TraceModel traceModel;
|
TraceModel traceModel;
|
||||||
@ -48,6 +48,8 @@ private:
|
|||||||
Averaging average;
|
Averaging average;
|
||||||
|
|
||||||
TileWidget *central;
|
TileWidget *central;
|
||||||
|
QCheckBox *cbSignalID;
|
||||||
|
QComboBox *cbWindowType, *cbDetector;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void dataChanged();
|
void dataChanged();
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
VNA::VNA(AppWindow *window)
|
VNA::VNA(AppWindow *window)
|
||||||
: Mode(window, "Vector Network Analyzer"),
|
: Mode(window, "Vector Network Analyzer"),
|
||||||
pref(window->getPreferenceRef()),
|
|
||||||
central(new TileWidget(traceModel))
|
central(new TileWidget(traceModel))
|
||||||
{
|
{
|
||||||
averages = 1;
|
averages = 1;
|
||||||
|
@ -48,8 +48,6 @@ private:
|
|||||||
void LoadSweepSettings();
|
void LoadSweepSettings();
|
||||||
void StoreSweepSettings();
|
void StoreSweepSettings();
|
||||||
|
|
||||||
Preferences &pref;
|
|
||||||
|
|
||||||
Protocol::SweepSettings settings;
|
Protocol::SweepSettings settings;
|
||||||
unsigned int averages;
|
unsigned int averages;
|
||||||
TraceModel traceModel;
|
TraceModel traceModel;
|
||||||
|
@ -10,6 +10,7 @@ QButtonGroup* Mode::modeButtonGroup = nullptr;
|
|||||||
|
|
||||||
Mode::Mode(AppWindow *window, QString name)
|
Mode::Mode(AppWindow *window, QString name)
|
||||||
: window(window),
|
: window(window),
|
||||||
|
pref(window->getPreferenceRef()),
|
||||||
name(name),
|
name(name),
|
||||||
central(nullptr)
|
central(nullptr)
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,8 @@ protected:
|
|||||||
std::set<QToolBar*> toolbars;
|
std::set<QToolBar*> toolbars;
|
||||||
std::set<QDockWidget*> docks;
|
std::set<QDockWidget*> docks;
|
||||||
|
|
||||||
|
Preferences &pref;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Mode *activeMode;
|
static Mode *activeMode;
|
||||||
static QWidget *cornerWidget;
|
static QWidget *cornerWidget;
|
||||||
|
@ -22,6 +22,14 @@ PreferencesDialog::PreferencesDialog(Preferences *pref, QWidget *parent) :
|
|||||||
ui->StartupSweepPoints->setEnabled(false);
|
ui->StartupSweepPoints->setEnabled(false);
|
||||||
ui->StartupSweepLevel->setEnabled(false);
|
ui->StartupSweepLevel->setEnabled(false);
|
||||||
ui->StartupSweepBandwidth->setEnabled(false);
|
ui->StartupSweepBandwidth->setEnabled(false);
|
||||||
|
ui->StartupGeneratorFrequency->setEnabled(false);
|
||||||
|
ui->StartupGeneratorLevel->setEnabled(false);
|
||||||
|
ui->StartupSAStart->setEnabled(false);
|
||||||
|
ui->StartupSAStop->setEnabled(false);
|
||||||
|
ui->StartupSARBW->setEnabled(false);
|
||||||
|
ui->StartupSAWindow->setEnabled(false);
|
||||||
|
ui->StartupSADetector->setEnabled(false);
|
||||||
|
ui->StartupSASignalID->setEnabled(false);
|
||||||
});
|
});
|
||||||
connect(ui->StartupSweepDefault, &QPushButton::clicked, [=](){
|
connect(ui->StartupSweepDefault, &QPushButton::clicked, [=](){
|
||||||
ui->StartupSweepStart->setEnabled(true);
|
ui->StartupSweepStart->setEnabled(true);
|
||||||
@ -29,6 +37,14 @@ PreferencesDialog::PreferencesDialog(Preferences *pref, QWidget *parent) :
|
|||||||
ui->StartupSweepPoints->setEnabled(true);
|
ui->StartupSweepPoints->setEnabled(true);
|
||||||
ui->StartupSweepLevel->setEnabled(true);
|
ui->StartupSweepLevel->setEnabled(true);
|
||||||
ui->StartupSweepBandwidth->setEnabled(true);
|
ui->StartupSweepBandwidth->setEnabled(true);
|
||||||
|
ui->StartupGeneratorFrequency->setEnabled(true);
|
||||||
|
ui->StartupGeneratorLevel->setEnabled(true);
|
||||||
|
ui->StartupSAStart->setEnabled(true);
|
||||||
|
ui->StartupSAStop->setEnabled(true);
|
||||||
|
ui->StartupSARBW->setEnabled(true);
|
||||||
|
ui->StartupSAWindow->setEnabled(true);
|
||||||
|
ui->StartupSADetector->setEnabled(true);
|
||||||
|
ui->StartupSASignalID->setEnabled(true);
|
||||||
});
|
});
|
||||||
ui->StartupSweepStart->setUnit("Hz");
|
ui->StartupSweepStart->setUnit("Hz");
|
||||||
ui->StartupSweepStart->setPrefixes(" kMG");
|
ui->StartupSweepStart->setPrefixes(" kMG");
|
||||||
@ -36,6 +52,14 @@ PreferencesDialog::PreferencesDialog(Preferences *pref, QWidget *parent) :
|
|||||||
ui->StartupSweepStop->setPrefixes(" kMG");
|
ui->StartupSweepStop->setPrefixes(" kMG");
|
||||||
ui->StartupSweepBandwidth->setUnit("Hz");
|
ui->StartupSweepBandwidth->setUnit("Hz");
|
||||||
ui->StartupSweepBandwidth->setPrefixes(" k");
|
ui->StartupSweepBandwidth->setPrefixes(" k");
|
||||||
|
ui->StartupGeneratorFrequency->setUnit("Hz");
|
||||||
|
ui->StartupGeneratorFrequency->setPrefixes(" kMG");
|
||||||
|
ui->StartupSAStart->setUnit("Hz");
|
||||||
|
ui->StartupSAStart->setPrefixes(" kMG");
|
||||||
|
ui->StartupSAStop->setUnit("Hz");
|
||||||
|
ui->StartupSAStop->setPrefixes(" kMG");
|
||||||
|
ui->StartupSARBW->setUnit("Hz");
|
||||||
|
ui->StartupSARBW->setPrefixes(" k");
|
||||||
|
|
||||||
// Page selection
|
// Page selection
|
||||||
connect(ui->treeWidget, &QTreeWidget::currentItemChanged, [=](QTreeWidgetItem *current, QTreeWidgetItem *) {
|
connect(ui->treeWidget, &QTreeWidget::currentItemChanged, [=](QTreeWidgetItem *current, QTreeWidgetItem *) {
|
||||||
@ -66,6 +90,14 @@ PreferencesDialog::PreferencesDialog(Preferences *pref, QWidget *parent) :
|
|||||||
p->Startup.DefaultSweep.bandwidth = ui->StartupSweepBandwidth->value();
|
p->Startup.DefaultSweep.bandwidth = ui->StartupSweepBandwidth->value();
|
||||||
p->Startup.DefaultSweep.points = ui->StartupSweepPoints->value();
|
p->Startup.DefaultSweep.points = ui->StartupSweepPoints->value();
|
||||||
p->Startup.DefaultSweep.excitation = ui->StartupSweepLevel->value();
|
p->Startup.DefaultSweep.excitation = ui->StartupSweepLevel->value();
|
||||||
|
p->Startup.Generator.frequency = ui->StartupGeneratorFrequency->value();
|
||||||
|
p->Startup.Generator.level = ui->StartupGeneratorLevel->value();
|
||||||
|
p->Startup.SA.start = ui->StartupSAStart->value();
|
||||||
|
p->Startup.SA.stop = ui->StartupSAStop->value();
|
||||||
|
p->Startup.SA.RBW = ui->StartupSARBW->value();
|
||||||
|
p->Startup.SA.window = ui->StartupSAWindow->currentIndex();
|
||||||
|
p->Startup.SA.detector = ui->StartupSADetector->currentIndex();
|
||||||
|
p->Startup.SA.signalID = ui->StartupSASignalID->isChecked();
|
||||||
p->Acquisition.alwaysExciteBothPorts = ui->AcquisitionAlwaysExciteBoth->isChecked();
|
p->Acquisition.alwaysExciteBothPorts = ui->AcquisitionAlwaysExciteBoth->isChecked();
|
||||||
p->Acquisition.suppressPeaks = ui->AcquisitionSuppressPeaks->isChecked();
|
p->Acquisition.suppressPeaks = ui->AcquisitionSuppressPeaks->isChecked();
|
||||||
accept();
|
accept();
|
||||||
@ -92,6 +124,14 @@ void PreferencesDialog::setInitialGUIState()
|
|||||||
ui->StartupSweepBandwidth->setValueQuiet(p->Startup.DefaultSweep.bandwidth);
|
ui->StartupSweepBandwidth->setValueQuiet(p->Startup.DefaultSweep.bandwidth);
|
||||||
ui->StartupSweepPoints->setValue(p->Startup.DefaultSweep.points);
|
ui->StartupSweepPoints->setValue(p->Startup.DefaultSweep.points);
|
||||||
ui->StartupSweepLevel->setValue(p->Startup.DefaultSweep.excitation);
|
ui->StartupSweepLevel->setValue(p->Startup.DefaultSweep.excitation);
|
||||||
|
ui->StartupGeneratorFrequency->setValue(p->Startup.Generator.frequency);
|
||||||
|
ui->StartupGeneratorLevel->setValue(p->Startup.Generator.level);
|
||||||
|
ui->StartupSAStart->setValue(p->Startup.SA.start);
|
||||||
|
ui->StartupSAStop->setValue(p->Startup.SA.stop);
|
||||||
|
ui->StartupSARBW->setValue(p->Startup.SA.RBW);
|
||||||
|
ui->StartupSAWindow->setCurrentIndex(p->Startup.SA.window);
|
||||||
|
ui->StartupSADetector->setCurrentIndex(p->Startup.SA.detector);
|
||||||
|
ui->StartupSASignalID->setChecked(p->Startup.SA.signalID);
|
||||||
|
|
||||||
ui->AcquisitionAlwaysExciteBoth->setChecked(p->Acquisition.alwaysExciteBothPorts);
|
ui->AcquisitionAlwaysExciteBoth->setChecked(p->Acquisition.alwaysExciteBothPorts);
|
||||||
ui->AcquisitionSuppressPeaks->setChecked(p->Acquisition.suppressPeaks);
|
ui->AcquisitionSuppressPeaks->setChecked(p->Acquisition.suppressPeaks);
|
||||||
|
@ -45,6 +45,18 @@ public:
|
|||||||
double bandwidth;
|
double bandwidth;
|
||||||
double excitation;
|
double excitation;
|
||||||
} DefaultSweep;
|
} DefaultSweep;
|
||||||
|
struct {
|
||||||
|
double frequency;
|
||||||
|
double level;
|
||||||
|
} Generator;
|
||||||
|
struct {
|
||||||
|
double start;
|
||||||
|
double stop;
|
||||||
|
double RBW;
|
||||||
|
int window;
|
||||||
|
int detector;
|
||||||
|
bool signalID;
|
||||||
|
} SA;
|
||||||
} Startup;
|
} Startup;
|
||||||
struct {
|
struct {
|
||||||
bool alwaysExciteBothPorts;
|
bool alwaysExciteBothPorts;
|
||||||
@ -56,7 +68,7 @@ private:
|
|||||||
QString name;
|
QString name;
|
||||||
QVariant def;
|
QVariant def;
|
||||||
};
|
};
|
||||||
const std::array<SettingDescription, 9> descr = {{
|
const std::array<SettingDescription, 17> descr = {{
|
||||||
{&Startup.ConnectToFirstDevice, "Startup.ConnectToFirstDevice", true},
|
{&Startup.ConnectToFirstDevice, "Startup.ConnectToFirstDevice", true},
|
||||||
{&Startup.RememberSweepSettings, "Startup.RememberSweepSettings", false},
|
{&Startup.RememberSweepSettings, "Startup.RememberSweepSettings", false},
|
||||||
{&Startup.DefaultSweep.start, "Startup.DefaultSweep.start", 1000000.0},
|
{&Startup.DefaultSweep.start, "Startup.DefaultSweep.start", 1000000.0},
|
||||||
@ -64,8 +76,16 @@ private:
|
|||||||
{&Startup.DefaultSweep.points, "Startup.DefaultSweep.points", 501},
|
{&Startup.DefaultSweep.points, "Startup.DefaultSweep.points", 501},
|
||||||
{&Startup.DefaultSweep.bandwidth, "Startup.DefaultSweep.bandwidth", 1000.0},
|
{&Startup.DefaultSweep.bandwidth, "Startup.DefaultSweep.bandwidth", 1000.0},
|
||||||
{&Startup.DefaultSweep.excitation, "Startup.DefaultSweep.excitation", -10.00},
|
{&Startup.DefaultSweep.excitation, "Startup.DefaultSweep.excitation", -10.00},
|
||||||
|
{&Startup.Generator.frequency, "Startup.Generator.frequency", 1000000000.0},
|
||||||
|
{&Startup.Generator.level, "Startup.Generator.level", -10.00},
|
||||||
|
{&Startup.SA.start, "Startup.SA.start", 950000000.0},
|
||||||
|
{&Startup.SA.stop, "Startup.SA.stop", 1050000000.0},
|
||||||
|
{&Startup.SA.RBW, "Startup.SA.RBW", 10000.0},
|
||||||
|
{&Startup.SA.window, "Startup.SA.window", 1},
|
||||||
|
{&Startup.SA.detector, "Startup.SA.detector", 0},
|
||||||
|
{&Startup.SA.signalID, "Startup.SA.signalID", true},
|
||||||
{&Acquisition.alwaysExciteBothPorts, "Acquisition.alwaysExciteBothPorts", true},
|
{&Acquisition.alwaysExciteBothPorts, "Acquisition.alwaysExciteBothPorts", true},
|
||||||
{&Acquisition.suppressPeaks, "Acquisition.suppressPeaks", true},
|
{&Acquisition.suppressPeaks, "Acquisition.suppressPeaks", true},
|
||||||
}};
|
}};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>646</width>
|
<width>619</width>
|
||||||
<height>543</height>
|
<height>730</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -67,32 +67,35 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="Startup">
|
<widget class="QWidget" name="Startup">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<property name="title">
|
<item>
|
||||||
<string>When starting the application...</string>
|
<widget class="QGroupBox" name="groupBox">
|
||||||
</property>
|
<property name="title">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<string>When starting the application...</string>
|
||||||
<item>
|
</property>
|
||||||
<widget class="QCheckBox" name="StartupAutoconnect">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="text">
|
|
||||||
<string>Autoconnect to the first device available</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Set sweep settings to...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QCheckBox" name="StartupAutoconnect">
|
||||||
|
<property name="text">
|
||||||
|
<string>Autoconnect to the first device available</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set to...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
@ -115,114 +118,294 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item>
|
||||||
</item>
|
<spacer name="horizontalSpacer">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<enum>Qt::Horizontal</enum>
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Start:</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="sizeHint" stdset="0">
|
||||||
</item>
|
<size>
|
||||||
<item row="0" column="1">
|
<width>40</width>
|
||||||
<widget class="SIUnitEdit" name="StartupSweepStart"/>
|
<height>20</height>
|
||||||
</item>
|
</size>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Stop:</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</spacer>
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="SIUnitEdit" name="StartupSweepStop"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Level:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="StartupSweepLevel">
|
|
||||||
<property name="suffix">
|
|
||||||
<string>dbm</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-42.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>-10.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>0.250000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string>Points:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QSpinBox" name="StartupSweepPoints">
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>4501</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>501</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string>IF bandwitdh:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="SIUnitEdit" name="StartupSweepBandwidth"/>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="orientation">
|
<property name="title">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>Vector Network Analyzer</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<size>
|
<item row="0" column="0">
|
||||||
<width>40</width>
|
<widget class="QLabel" name="label_2">
|
||||||
<height>20</height>
|
<property name="text">
|
||||||
</size>
|
<string>Start:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="SIUnitEdit" name="StartupSweepStart"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Stop:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="SIUnitEdit" name="StartupSweepStop"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Simulus level:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="StartupSweepLevel">
|
||||||
|
<property name="suffix">
|
||||||
|
<string>dbm</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-42.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>0.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.250000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Points:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QSpinBox" name="StartupSweepPoints">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>4501</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>501</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>IF bandwitdh:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="SIUnitEdit" name="StartupSweepBandwidth"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>Signal Generator</string>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Frequency:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="SIUnitEdit" name="StartupGeneratorFrequency"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>Output level:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="StartupGeneratorLevel">
|
||||||
|
<property name="suffix">
|
||||||
|
<string>dbm</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-42.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>0.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.250000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_4">
|
||||||
|
<property name="title">
|
||||||
|
<string>Spectrum Analyzer</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Start:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="SIUnitEdit" name="StartupSAStart"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Stop:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="SIUnitEdit" name="StartupSAStop"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>RBW:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="SIUnitEdit" name="StartupSARBW"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="text">
|
||||||
|
<string>Window:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="StartupSAWindow">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>None</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Kaiser</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hann</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Flat Top</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Detector:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="StartupSADetector">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>+Peak</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>-Peak</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sample</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Normal</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Average</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_14">
|
||||||
|
<property name="text">
|
||||||
|
<string>Signal Identification:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QCheckBox" name="StartupSASignalID">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>17</width>
|
||||||
|
<height>37</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>48</width>
|
||||||
<height>40</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@ -244,7 +427,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="AcquisitionSuppressPeaks">
|
<widget class="QCheckBox" name="AcquisitionSuppressPeaks">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Due to limited fractional divider settings, the source and 1.LO PLLs are not able to reach every frequency exactly. At some specific frequencies this causes the final IF to shift. At these frequencies there will be a positive or negative peak in the trace measurement that is not actually there.<br/><br/>Checking this option shifts the 2.LO for points where this could be an issue. This will remove the peaks but slow down the sweep slightly.</p></body></html></string>
|
<string><html><head/><body><p>Due to limited fractional divider settings, the source and 1.LO PLLs are not able to reach every frequency exactly. At some specific frequencies this causes the final IF to shift. At these frequencies there will be a positive or negative peak in the trace measurement that is not actually there.<br/><br/>Checking this option shifts the 2.LO for points where this could be an issue. This will remove the peaks but slows down the sweep slightly.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Suppress invalid peaks</string>
|
<string>Suppress invalid peaks</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user