mirror of
https://github.com/jankae/LibreVNA.git
synced 2025-12-06 07:12:10 +01:00
manual control dialog for experimental hardware version 0xE0
Some checks failed
Build / PC_Application_Ubuntu (push) Has been cancelled
Build / PC_Application_RPi5 (push) Has been cancelled
Build / PC_Application_Windows (push) Has been cancelled
Build / PC_Application_OSX (push) Has been cancelled
Build / PC_Application_OSX_13 (push) Has been cancelled
Build / Embedded_Firmware (push) Has been cancelled
HIL_Tests / Get_Repository (push) Has been cancelled
Unit_Tests / Tests (push) Has been cancelled
HIL_Tests / PC_Application_RPi5 (push) Has been cancelled
HIL_Tests / Embedded_Firmware (push) Has been cancelled
HIL_Tests / HIL (push) Has been cancelled
Some checks failed
Build / PC_Application_Ubuntu (push) Has been cancelled
Build / PC_Application_RPi5 (push) Has been cancelled
Build / PC_Application_Windows (push) Has been cancelled
Build / PC_Application_OSX (push) Has been cancelled
Build / PC_Application_OSX_13 (push) Has been cancelled
Build / Embedded_Firmware (push) Has been cancelled
HIL_Tests / Get_Repository (push) Has been cancelled
Unit_Tests / Tests (push) Has been cancelled
HIL_Tests / PC_Application_RPi5 (push) Has been cancelled
HIL_Tests / Embedded_Firmware (push) Has been cancelled
HIL_Tests / HIL (push) Has been cancelled
This commit is contained in:
parent
3071d8de72
commit
5947584e63
|
|
@ -3,6 +3,7 @@
|
|||
#include "manualcontroldialogV1.h"
|
||||
#include "manualcontroldialogvff.h"
|
||||
#include "manualcontroldialogvfe.h"
|
||||
#include "manualcontroldialogVE0.h"
|
||||
#include "deviceconfigurationdialogv1.h"
|
||||
#include "deviceconfigurationdialogvff.h"
|
||||
#include "deviceconfigurationdialogvfe.h"
|
||||
|
|
@ -127,6 +128,9 @@ LibreVNADriver::LibreVNADriver()
|
|||
case 1:
|
||||
manualControlDialog = new ManualControlDialogV1(*this);
|
||||
break;
|
||||
case 0xE0:
|
||||
manualControlDialog = new ManualControlDialogVE0(*this);
|
||||
break;
|
||||
case 0xFE:
|
||||
manualControlDialog = new ManualControlDialogVFE(*this);
|
||||
break;
|
||||
|
|
@ -769,6 +773,7 @@ QString LibreVNADriver::hardwareVersionToString(uint8_t version)
|
|||
{
|
||||
switch(version) {
|
||||
case 0x01: return "1";
|
||||
case 0xE0: return "SAP1";
|
||||
case 0xFE: return "P2";
|
||||
case 0xFF: return "PT";
|
||||
default: return "Unknown";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,179 @@
|
|||
#include "manualcontroldialogVE0.h"
|
||||
|
||||
#include "ui_manualcontroldialogVE0.h"
|
||||
#include "Util/util.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
#include <QButtonGroup>
|
||||
#include <complex>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
ManualControlDialogVE0::ManualControlDialogVE0(LibreVNADriver &dev, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ManualControlDialogVE0),
|
||||
dev(dev)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
emit dev.acquireControl();
|
||||
|
||||
ui->src1Freq->setUnit("Hz");
|
||||
ui->src1Freq->setPrefixes(" kMG");
|
||||
ui->src1Freq->setPrecision(6);
|
||||
ui->src1Freq->setValueQuiet(100000000);
|
||||
|
||||
ui->src2Freq->setUnit("Hz");
|
||||
ui->src2Freq->setPrefixes(" kMG");
|
||||
ui->src2Freq->setPrecision(6);
|
||||
ui->src2Freq->setValueQuiet(100000000);
|
||||
|
||||
ui->LO1Freq->setUnit("Hz");
|
||||
ui->LO1Freq->setPrefixes(" kMG");
|
||||
ui->LO1Freq->setPrecision(6);
|
||||
ui->LO1Freq->setValueQuiet(100000000);
|
||||
|
||||
ui->LO2Freq->setUnit("Hz");
|
||||
ui->LO2Freq->setPrefixes(" kMG");
|
||||
ui->LO2Freq->setPrecision(6);
|
||||
ui->LO2Freq->setValueQuiet(100000000);
|
||||
|
||||
// Readonly widgets
|
||||
auto MakeReadOnly = [](QWidget* w) {
|
||||
w->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
w->setFocusPolicy(Qt::NoFocus);
|
||||
};
|
||||
MakeReadOnly(ui->port1min);
|
||||
MakeReadOnly(ui->port1max);
|
||||
MakeReadOnly(ui->port1mag);
|
||||
MakeReadOnly(ui->port1phase);
|
||||
MakeReadOnly(ui->port1referenced);
|
||||
MakeReadOnly(ui->port2min);
|
||||
MakeReadOnly(ui->port2max);
|
||||
MakeReadOnly(ui->port2mag);
|
||||
MakeReadOnly(ui->port2phase);
|
||||
MakeReadOnly(ui->port2referenced);
|
||||
MakeReadOnly(ui->refmin);
|
||||
MakeReadOnly(ui->refmax);
|
||||
MakeReadOnly(ui->refmag);
|
||||
MakeReadOnly(ui->refphase);
|
||||
|
||||
connect(&dev, &LibreVNADriver::receivedPacket, this, [=](const Protocol::PacketInfo &p){
|
||||
if(p.type == Protocol::PacketType::ManualStatus) {
|
||||
NewStatus(p.manualStatus);
|
||||
}
|
||||
}, Qt::QueuedConnection);
|
||||
|
||||
connect(ui->src1CE, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->src2CE, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->LO1CE, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->LO2CE, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->srcAmp, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->LO1CE, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
|
||||
connect(ui->srcSel, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->portSel, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->LOSel, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->P1Path, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->P1Amp, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->P2Path, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->P2Amp, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->RefAmp, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->Window, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
|
||||
connect(ui->src1Freq, &SIUnitEdit::valueChanged, [=](double) { UpdateDevice(); });
|
||||
connect(ui->src2Freq, &SIUnitEdit::valueChanged, [=](double) { UpdateDevice(); });
|
||||
connect(ui->LO1Freq, &SIUnitEdit::valueChanged, [=](double) { UpdateDevice(); });
|
||||
connect(ui->LO2Freq, &SIUnitEdit::valueChanged, [=](double) { UpdateDevice(); });
|
||||
|
||||
connect(ui->src1Pwr, qOverload<int>(&QSpinBox::valueChanged), [=](double) { UpdateDevice(); });
|
||||
connect(ui->src2Pwr, qOverload<int>(&QSpinBox::valueChanged), [=](double) { UpdateDevice(); });
|
||||
connect(ui->LO1Pwr, qOverload<int>(&QSpinBox::valueChanged), [=](double) { UpdateDevice(); });
|
||||
connect(ui->LO2Pwr, qOverload<int>(&QSpinBox::valueChanged), [=](double) { UpdateDevice(); });
|
||||
connect(ui->Samples, qOverload<int>(&QSpinBox::valueChanged), [=](double) { UpdateDevice(); });
|
||||
|
||||
UpdateDevice();
|
||||
}
|
||||
|
||||
ManualControlDialogVE0::~ManualControlDialogVE0()
|
||||
{
|
||||
emit dev.releaseControl();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ManualControlDialogVE0::NewStatus(Protocol::ManualStatus status)
|
||||
{
|
||||
// ADC values
|
||||
auto &s = status.VE0;
|
||||
ui->port1min->setText(QString::number(s.port1min));
|
||||
ui->port1max->setText(QString::number(s.port1max));
|
||||
auto port1 = complex<double>(s.port1real, s.port1imag);
|
||||
ui->port1mag->setText(QString::number(abs(port1)));
|
||||
ui->port1phase->setText(QString::number(arg(port1)*180/M_PI));
|
||||
|
||||
ui->port2min->setText(QString::number(s.port2min));
|
||||
ui->port2max->setText(QString::number(s.port2max));
|
||||
auto port2 = complex<double>(s.port2real, s.port2imag);
|
||||
ui->port2mag->setText(QString::number(abs(port2)));
|
||||
ui->port2phase->setText(QString::number(arg(port2)*180/M_PI));
|
||||
|
||||
ui->refmin->setText(QString::number(s.refmin));
|
||||
ui->refmax->setText(QString::number(s.refmax));
|
||||
auto ref = complex<double>(s.refreal, s.refimag);
|
||||
ui->refmag->setText(QString::number(abs(ref)));
|
||||
ui->refphase->setText(QString::number(arg(ref)*180/M_PI));
|
||||
|
||||
port1referenced = port1 / ref;
|
||||
port2referenced = port2 / ref;
|
||||
auto port1db = Util::SparamTodB(port1referenced);
|
||||
auto port2db = Util::SparamTodB(port2referenced);
|
||||
|
||||
ui->port1referenced->setText(QString::number(port1db, 'f', 1) + "db@" + QString::number(arg(port1referenced)*180/M_PI, 'f', 0) + "°");
|
||||
ui->port2referenced->setText(QString::number(port2db, 'f', 1) + "db@" + QString::number(arg(port2referenced)*180/M_PI, 'f', 0) + "°");
|
||||
}
|
||||
|
||||
void ManualControlDialogVE0::UpdateDevice()
|
||||
{
|
||||
Protocol::PacketInfo p;
|
||||
p.type = Protocol::PacketType::ManualControl;
|
||||
auto &m = p.manual.VE0;
|
||||
// Source
|
||||
m.src1Freq = ui->src1Freq->value();
|
||||
m.src2Freq = ui->src2Freq->value();
|
||||
m.src1Pwr = ui->src1Pwr->value();
|
||||
m.src2Pwr = ui->src2Pwr->value();
|
||||
m.src1CE = ui->src1CE->isChecked();
|
||||
m.src2CE = ui->src2CE->isChecked();
|
||||
m.srcSel = ui->srcSel->currentIndex();
|
||||
m.portSel = ui->portSel->currentIndex();
|
||||
m.srcAmp = ui->srcAmp->isChecked();
|
||||
// LO
|
||||
m.LO1Freq = ui->LO1Freq->value();
|
||||
m.LO2Freq = ui->LO2Freq->value();
|
||||
m.LO1Pwr = ui->LO1Pwr->value();
|
||||
m.LO2Pwr = ui->LO2Pwr->value();
|
||||
m.LO1CE = ui->LO1CE->isChecked();
|
||||
m.LO2CE = ui->LO2CE->isChecked();
|
||||
m.LOSel = ui->LOSel->currentIndex();
|
||||
// Port 1
|
||||
m.P1PathSel = ui->P1Path->currentIndex();
|
||||
m.P1AmpOn = ui->P1Amp->currentIndex() == 1 ? 1 : 0;
|
||||
m.P1AmpBypass = ui->P1Amp->currentIndex() == 2 ? 1 : 0;
|
||||
// Port 2
|
||||
m.P2PathSel = ui->P2Path->currentIndex();
|
||||
m.P2AmpOn = ui->P2Amp->currentIndex() == 1 ? 1 : 0;
|
||||
m.P2AmpBypass = ui->P2Amp->currentIndex() == 2 ? 1 : 0;
|
||||
// Reference
|
||||
m.RefAmpOn = ui->RefAmp->currentIndex() == 1 ? 1 : 0;
|
||||
m.RefAmpBypass = ui->RefAmp->currentIndex() == 2 ? 1 : 0;
|
||||
// Acquisition
|
||||
m.Samples = ui->Samples->value();
|
||||
m.WindowType = ui->Window->currentIndex();
|
||||
|
||||
qDebug() << "Updating manual control state";
|
||||
|
||||
dev.SendPacket(p);
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef MANUALCONTROLDIALOGVE0_H
|
||||
#define MANUALCONTROLDIALOGVE0_H
|
||||
|
||||
#include "librevnadriver.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <complex>
|
||||
|
||||
namespace Ui {
|
||||
class ManualControlDialogVE0;
|
||||
}
|
||||
|
||||
class ManualControlDialogVE0 : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ManualControlDialogVE0(LibreVNADriver &dev, QWidget *parent = nullptr);
|
||||
~ManualControlDialogVE0();
|
||||
|
||||
public slots:
|
||||
void NewStatus(Protocol::ManualStatus status);
|
||||
|
||||
private:
|
||||
void UpdateDevice();
|
||||
Ui::ManualControlDialogVE0 *ui;
|
||||
LibreVNADriver &dev;
|
||||
std::complex<double> port1referenced;
|
||||
std::complex<double> port2referenced;
|
||||
|
||||
std::vector<SCPICommand*> commands;
|
||||
};
|
||||
|
||||
#endif // MANUALCONTROLDIALOGVE0_H
|
||||
|
|
@ -0,0 +1,797 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ManualControlDialogVE0</class>
|
||||
<widget class="QDialog" name="ManualControlDialogVE0">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModality::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>777</width>
|
||||
<height>717</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Manual System Control</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_10">
|
||||
<property name="title">
|
||||
<string>Signal Generation</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Source</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>PLL1</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="src1CE">
|
||||
<property name="text">
|
||||
<string>Chip Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Power:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="SIUnitEdit" name="src1Freq"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="src1Pwr">
|
||||
<property name="maximum">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>18</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>PLL2</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="src2CE">
|
||||
<property name="text">
|
||||
<string>Chip Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Power:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="SIUnitEdit" name="src2Freq"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="src2Pwr">
|
||||
<property name="maximum">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>18</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_10">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>PLL selection:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="srcSel">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>PLL1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>PLL2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>Amplifier:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="srcAmp">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Port selection:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="portSel">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Port 1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Port 2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>LO</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="title">
|
||||
<string>PLL1</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="LO1CE">
|
||||
<property name="text">
|
||||
<string>Chip Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_11">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_29">
|
||||
<property name="text">
|
||||
<string>Power:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_30">
|
||||
<property name="text">
|
||||
<string>Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="SIUnitEdit" name="LO1Freq"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="LO1Pwr">
|
||||
<property name="maximum">
|
||||
<number>63</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>18</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_6">
|
||||
<property name="title">
|
||||
<string>PLL2</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="LO2CE">
|
||||
<property name="text">
|
||||
<string>Chip Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_12">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_31">
|
||||
<property name="text">
|
||||
<string>Power:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_32">
|
||||
<property name="text">
|
||||
<string>Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="SIUnitEdit" name="LO2Freq"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="LO2Pwr">
|
||||
<property name="maximum">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>18</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_13">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_33">
|
||||
<property name="text">
|
||||
<string>PLL selection:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="LOSel">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>PLL1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>PLL2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_11">
|
||||
<property name="title">
|
||||
<string>Signal Analysis</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_7">
|
||||
<property name="title">
|
||||
<string>Port 1</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Path:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="P1Path">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Reflection</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Transmission</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Amplifier:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="P1Amp">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>On</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bypass</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_8">
|
||||
<property name="title">
|
||||
<string>Port 2</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Path:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="P2Path">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Reflection</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Transmission</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Amplifier:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="P2Amp">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>On</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bypass</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="title">
|
||||
<string>Reference</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Amplifier:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="RefAmp">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>On</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bypass</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_13">
|
||||
<property name="title">
|
||||
<string>Acquisition</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Samples:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="Samples">
|
||||
<property name="minimum">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>131072</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>131072</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>Window:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="Window">
|
||||
<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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_12">
|
||||
<property name="title">
|
||||
<string>Measurements</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_16">
|
||||
<property name="title">
|
||||
<string>Port 1</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_19">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_9">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>ADC min:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="port1min"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>ADC max:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="port1max"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_27">
|
||||
<property name="text">
|
||||
<string>Magnitude:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="port1mag"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_28">
|
||||
<property name="text">
|
||||
<string>Phase:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="port1phase"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Referenced:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="port1referenced"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_14">
|
||||
<property name="title">
|
||||
<string>Port 2</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_7">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>ADC min:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="port2min"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>ADC max:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="port2max"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>Magnitude:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="port2mag"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Phase:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="port2phase"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Referenced:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="port2referenced"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_15">
|
||||
<property name="title">
|
||||
<string>Reference</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_18">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_8">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>ADC min:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="refmin"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="text">
|
||||
<string>ADC max:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="refmax"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="text">
|
||||
<string>Magnitude:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="refmag"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_24">
|
||||
<property name="text">
|
||||
<string>Phase:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="refphase"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SIUnitEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>CustomWidgets/siunitedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="PortSwitchGroup"/>
|
||||
<buttongroup name="SourceSwitchGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
@ -35,6 +35,7 @@ HEADERS += \
|
|||
Device/LibreVNA/librevnatcpdriver.h \
|
||||
Device/LibreVNA/librevnausbdriver.h \
|
||||
Device/LibreVNA/manualcontroldialogV1.h \
|
||||
Device/LibreVNA/manualcontroldialogVE0.h \
|
||||
Device/LibreVNA/manualcontroldialogvfe.h \
|
||||
Device/LibreVNA/manualcontroldialogvff.h \
|
||||
Device/LibreVNA/receivercaldialog.h \
|
||||
|
|
@ -201,6 +202,7 @@ SOURCES += \
|
|||
Device/LibreVNA/librevnatcpdriver.cpp \
|
||||
Device/LibreVNA/librevnausbdriver.cpp \
|
||||
Device/LibreVNA/manualcontroldialogV1.cpp \
|
||||
Device/LibreVNA/manualcontroldialogVE0.cpp \
|
||||
Device/LibreVNA/manualcontroldialogvfe.cpp \
|
||||
Device/LibreVNA/manualcontroldialogvff.cpp \
|
||||
Device/LibreVNA/receivercaldialog.cpp \
|
||||
|
|
@ -362,6 +364,7 @@ FORMS += \
|
|||
Device/LibreVNA/frequencycaldialog.ui \
|
||||
Device/LibreVNA/librevnadriversettingswidget.ui \
|
||||
Device/LibreVNA/manualcontroldialogV1.ui \
|
||||
Device/LibreVNA/manualcontroldialogVE0.ui \
|
||||
Device/LibreVNA/manualcontroldialogvfe.ui \
|
||||
Device/LibreVNA/manualcontroldialogvff.ui \
|
||||
Device/devicelog.ui \
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ SOURCES += \
|
|||
../LibreVNA-GUI/Device/LibreVNA/librevnatcpdriver.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogV1.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogVE0.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvfe.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvff.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/receivercaldialog.cpp \
|
||||
|
|
@ -224,6 +225,7 @@ HEADERS += \
|
|||
../LibreVNA-GUI/Device/LibreVNA/librevnatcpdriver.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogV1.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogVE0.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvfe.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvff.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/receivercaldialog.h \
|
||||
|
|
@ -397,6 +399,7 @@ FORMS += \
|
|||
../LibreVNA-GUI/Device/LibreVNA/librevnadriversettingswidget.ui \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogV1.ui \
|
||||
../LibreVNA-GUI/Device/LibreVNA/Compound/compounddeviceeditdialog.ui \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogVE0.ui \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvfe.ui \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvff.ui \
|
||||
../LibreVNA-GUI/Device/devicelog.ui \
|
||||
|
|
|
|||
|
|
@ -285,6 +285,14 @@ using ManualStatus = struct _manualstatus {
|
|||
uint16_t temp_eCal; // in 1/100 °C
|
||||
uint16_t power_heater; // in mW
|
||||
} VFE;
|
||||
struct {
|
||||
int16_t port1min, port1max;
|
||||
int16_t port2min, port2max;
|
||||
int16_t refmin, refmax;
|
||||
float port1real, port1imag;
|
||||
float port2real, port2imag;
|
||||
float refreal, refimag;
|
||||
} VE0;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -367,6 +375,42 @@ using ManualControl = struct _manualControl {
|
|||
uint8_t eCal_state :2;
|
||||
uint16_t eCal_target; // in 1/100 °C
|
||||
} VFE;
|
||||
struct {
|
||||
// Source
|
||||
uint32_t src1Freq;
|
||||
uint32_t src2Freq;
|
||||
uint8_t src1Pwr;
|
||||
uint8_t src2Pwr;
|
||||
uint8_t src1CE :1;
|
||||
uint8_t src2CE :1;
|
||||
uint8_t srcSel :2; // 0: switch off, 1: PLL1 selected, 2: PLL2 selected
|
||||
uint8_t portSel :2; // 0: both off, 1: port 1 selected, 2: port 2 selected
|
||||
uint8_t srcAmp :1;
|
||||
uint8_t unused1 :1;
|
||||
// LO
|
||||
uint32_t LO1Freq;
|
||||
uint32_t LO2Freq;
|
||||
uint8_t LO1Pwr;
|
||||
uint8_t LO2Pwr;
|
||||
uint8_t LO1CE :1;
|
||||
uint8_t LO2CE :1;
|
||||
uint8_t LOSel :1; // 0: PLL1 selected, 1: PLL2 selected
|
||||
uint8_t unused2 :5;
|
||||
// Port 1
|
||||
uint8_t P1PathSel :1; // 0: reflection path selected, 1: transmission path selected
|
||||
uint8_t P1AmpOn :1;
|
||||
uint8_t P1AmpBypass :1;
|
||||
// Port 2
|
||||
uint8_t P2PathSel :1; // 0: reflection path selected, 1: transmission path selected
|
||||
uint8_t P2AmpOn :1;
|
||||
uint8_t P2AmpBypass :1;
|
||||
// Reference
|
||||
uint8_t RefAmpOn :1;
|
||||
uint8_t RefAmpBypass :1;
|
||||
// Acquisition
|
||||
uint32_t Samples;
|
||||
uint8_t WindowType :2;
|
||||
} VE0;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue