mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-02-23 16:05:16 +01:00
manual control dialog
This commit is contained in:
parent
b9523b4864
commit
5762f9131d
|
|
@ -3,6 +3,7 @@
|
|||
#include "manualcontroldialogV1.h"
|
||||
#include "manualcontroldialogvff.h"
|
||||
#include "manualcontroldialogvfe.h"
|
||||
#include "manualcontroldialogvfd.h"
|
||||
#include "deviceconfigurationdialogv1.h"
|
||||
#include "deviceconfigurationdialogvff.h"
|
||||
#include "deviceconfigurationdialogvfe.h"
|
||||
|
|
@ -108,6 +109,13 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static_assert(offsetof(Protocol::ManualControl, VFD.SourceFrequency) == 0, "Error");
|
||||
static_assert(offsetof(Protocol::ManualControl, VFD.LOFrequency) == 13, "Error");
|
||||
static_assert(offsetof(Protocol::ManualControl, VFD.DACFreqA) == 21, "Error");
|
||||
static_assert(offsetof(Protocol::ManualControl, VFD.DACFreqB) == 25, "Error");
|
||||
static_assert(offsetof(Protocol::ManualControl, VFD.DACAmpA) == 29, "Error");
|
||||
static_assert(offsetof(Protocol::ManualControl, VFD.DACAmpB) == 31, "Error");
|
||||
|
||||
LibreVNADriver::LibreVNADriver()
|
||||
{
|
||||
connected = false;
|
||||
|
|
@ -127,6 +135,9 @@ LibreVNADriver::LibreVNADriver()
|
|||
case 1:
|
||||
manualControlDialog = new ManualControlDialogV1(*this);
|
||||
break;
|
||||
case 0xFD:
|
||||
manualControlDialog = new ManualControlDialogVFD(*this);
|
||||
break;
|
||||
case 0xFE:
|
||||
manualControlDialog = new ManualControlDialogVFE(*this);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,141 @@
|
|||
#include "manualcontroldialogVFD.h"
|
||||
|
||||
#include "ui_manualcontroldialogVFD.h"
|
||||
#include "Util/util.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
#include <QButtonGroup>
|
||||
#include <complex>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
ManualControlDialogVFD::ManualControlDialogVFD(LibreVNADriver &dev, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ManualControlDialogVFD),
|
||||
dev(dev)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
emit dev.acquireControl();
|
||||
|
||||
ui->SourceFrequency->setUnit("Hz");
|
||||
ui->SourceFrequency->setPrefixes(" MG");
|
||||
ui->SourceFrequency->setPrecision(6);
|
||||
ui->SourceFrequency->setValueQuiet(1000000000);
|
||||
|
||||
ui->LOFrequency->setUnit("Hz");
|
||||
ui->LOFrequency->setPrefixes(" MG");
|
||||
ui->LOFrequency->setPrecision(6);
|
||||
ui->LOFrequency->setValueQuiet(1000000000);
|
||||
|
||||
ui->DACFrequencyA->setUnit("Hz");
|
||||
ui->DACFrequencyA->setPrefixes(" kM");
|
||||
ui->DACFrequencyA->setPrecision(6);
|
||||
ui->DACFrequencyA->setValueQuiet(1000000);
|
||||
|
||||
ui->DACFrequencyB->setUnit("Hz");
|
||||
ui->DACFrequencyB->setPrefixes(" kM");
|
||||
ui->DACFrequencyB->setPrecision(6);
|
||||
ui->DACFrequencyB->setValueQuiet(1000000);
|
||||
|
||||
ui->DACAmplitudeA->setValue(2047);
|
||||
ui->DACAmplitudeB->setValue(2047);
|
||||
|
||||
auto updateVariableAtt = [=](unsigned int value){
|
||||
ui->SourceVariableAttSlider->setValue(value);
|
||||
ui->SourceVariableAttEntry->setValueQuiet(value);
|
||||
UpdateDevice();
|
||||
};
|
||||
connect(ui->SourceVariableAttEntry, &SIUnitEdit::valueChanged, this, [=](double newval){
|
||||
updateVariableAtt(newval);
|
||||
});
|
||||
connect(ui->SourceVariableAttSlider, &QSlider::sliderMoved, this, [=](int pos){
|
||||
updateVariableAtt(pos);
|
||||
});
|
||||
|
||||
// Readonly widgets
|
||||
auto MakeReadOnly = [](QWidget* w) {
|
||||
w->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
w->setFocusPolicy(Qt::NoFocus);
|
||||
};
|
||||
MakeReadOnly(ui->SourceLocked);
|
||||
MakeReadOnly(ui->LOLocked);
|
||||
|
||||
// connect(&dev, &LibreVNADriver::receivedPacket, this, [=](const Protocol::PacketInfo &p){
|
||||
// if(p.type == Protocol::PacketType::ManualStatus) {
|
||||
// NewStatus(p.manualStatus);
|
||||
// }
|
||||
// }, Qt::QueuedConnection);
|
||||
|
||||
connect(ui->SourceCE, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->SourceRFEN, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->LOCE, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->LORFEN, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->SourceModEn, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->SourceAmp1En, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->SourceAmp2En, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->LOAmpEn, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
connect(ui->DACEnable, &QCheckBox::toggled, [=](bool) { UpdateDevice(); });
|
||||
|
||||
connect(ui->SourceFilter, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->SourceBandsel, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->SourcePortSel, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
connect(ui->LOMode, qOverload<int>(&QComboBox::activated), [=](int) { UpdateDevice(); });
|
||||
|
||||
connect(ui->SourceFrequency, &SIUnitEdit::valueChanged, [=](double) { UpdateDevice(); });
|
||||
connect(ui->LOFrequency, &SIUnitEdit::valueChanged, [=](double) { UpdateDevice(); });
|
||||
connect(ui->DACFrequencyA, &SIUnitEdit::valueChanged, [=](double) { UpdateDevice(); });
|
||||
connect(ui->DACFrequencyB, &SIUnitEdit::valueChanged, [=](double) { UpdateDevice(); });
|
||||
|
||||
connect(ui->SourceStepAtt, qOverload<int>(&QSpinBox::valueChanged), [=](int) { UpdateDevice(); });
|
||||
connect(ui->DACAmplitudeA, qOverload<int>(&QSpinBox::valueChanged), [=](int) { UpdateDevice(); });
|
||||
connect(ui->DACAmplitudeB, qOverload<int>(&QSpinBox::valueChanged), [=](int) { UpdateDevice(); });
|
||||
|
||||
UpdateDevice();
|
||||
}
|
||||
|
||||
ManualControlDialogVFD::~ManualControlDialogVFD()
|
||||
{
|
||||
emit dev.releaseControl();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ManualControlDialogVFD::UpdateDevice()
|
||||
{
|
||||
Protocol::PacketInfo p;
|
||||
p.type = Protocol::PacketType::ManualControl;
|
||||
auto &m = p.manual.VFD;
|
||||
// Source
|
||||
m.SourceFrequency = ui->SourceFrequency->value();
|
||||
m.SourceCE = ui->SourceCE->isChecked();
|
||||
m.SourceRFEN = ui->SourceRFEN->isChecked();
|
||||
m.SourceModEn = ui->SourceModEn->isChecked();
|
||||
m.SourceAmp1En = ui->SourceAmp1En->isChecked();
|
||||
m.SourceAmp2En = ui->SourceAmp2En->isChecked();
|
||||
m.SourceBandSel = ui->SourceBandsel->currentIndex();
|
||||
m.SourceFilter = ui->SourceFilter->currentIndex();
|
||||
m.SourceVariableAttenuator = ui->SourceVariableAttSlider->value();
|
||||
m.SourceStepAttenuator = ui->SourceStepAtt->value();
|
||||
m.SourcePortSel = ui->SourcePortSel->currentIndex();
|
||||
|
||||
// LO
|
||||
m.LOCE = ui->LOCE->isChecked();
|
||||
m.LORFEN = ui->LOCE->isChecked();
|
||||
m.LOAmplifierEN = ui->LOAmpEn->isChecked();
|
||||
m.LOMode = ui->LOMode->currentIndex();
|
||||
m.LOFrequency = ui->LOFrequency->value();
|
||||
|
||||
// DAC
|
||||
m.DACFreqA = ui->DACFrequencyA->value();
|
||||
m.DACFreqB = ui->DACFrequencyB->value();
|
||||
m.DACAmpA = ui->DACAmplitudeA->value();
|
||||
m.DACAmpB = ui->DACAmplitudeB->value();
|
||||
m.DACEn = ui->DACEnable->isChecked();
|
||||
|
||||
qDebug() << "Updating manual control state";
|
||||
|
||||
dev.SendPacket(p);
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
#ifndef MANUALCONTROLDIALOGVFD_H
|
||||
#define MANUALCONTROLDIALOGVFD_H
|
||||
|
||||
#include "librevnadriver.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <complex>
|
||||
|
||||
namespace Ui {
|
||||
class ManualControlDialogVFD;
|
||||
}
|
||||
|
||||
class ManualControlDialogVFD : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ManualControlDialogVFD(LibreVNADriver &dev, QWidget *parent = nullptr);
|
||||
~ManualControlDialogVFD();
|
||||
|
||||
void setHighSourceChipEnable(bool enable);
|
||||
bool getHighSourceChipEnable();
|
||||
void setHighSourceRFEnable(bool enable);
|
||||
bool getHighSourceRFEnable();
|
||||
bool getHighSourceLocked();
|
||||
bool setHighSourcePower(int dBm);
|
||||
int getHighSourcePower();
|
||||
void setHighSourceFrequency(double f);
|
||||
double getHighSourceFrequency();
|
||||
|
||||
enum class LPF {
|
||||
M947,
|
||||
M1880,
|
||||
M3500,
|
||||
None,
|
||||
};
|
||||
|
||||
void setHighSourceLPF(LPF lpf);
|
||||
LPF getHighSourceLPF();
|
||||
void setLowSourceEnable(bool enable);
|
||||
bool getLowSourceEnable();
|
||||
bool setLowSourcePower(int mA);
|
||||
int getLowSourcePower();
|
||||
void setLowSourceFrequency(double f);
|
||||
double getLowSourceFrequency();
|
||||
void setHighband(bool high);
|
||||
bool getHighband();
|
||||
void setAttenuator(double att);
|
||||
double getAttenuator();
|
||||
void setAmplifierEnable(bool enable);
|
||||
bool getAmplifierEnable();
|
||||
bool setPortSwitch(int port);
|
||||
int getPortSwitch();
|
||||
void setLO1ChipEnable(bool enable);
|
||||
bool getLO1ChipEnable();
|
||||
void setLO1RFEnable(bool enable);
|
||||
bool getLO1RFEnable();
|
||||
bool getLO1Locked();
|
||||
void setLO1Frequency(double f);
|
||||
double getLO1Frequency();
|
||||
void setIF1Frequency(double f);
|
||||
double getIF1Frequency();
|
||||
void setLO2Enable(bool enable);
|
||||
bool getLO2Enable();
|
||||
void setLO2Frequency(double f);
|
||||
double getLO2Frequency();
|
||||
void setIF2Frequency(double f);
|
||||
double getIF2Frequency();
|
||||
|
||||
|
||||
private:
|
||||
void UpdateDevice();
|
||||
Ui::ManualControlDialogVFD *ui;
|
||||
LibreVNADriver &dev;
|
||||
};
|
||||
|
||||
#endif // MANUALCONTROLDIALOGV1_H
|
||||
|
|
@ -0,0 +1,439 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ManualControlDialogVFD</class>
|
||||
<widget class="QWidget" name="ManualControlDialogVFD">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>640</width>
|
||||
<height>453</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Manual Control</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_10">
|
||||
<property name="title">
|
||||
<string>Signal Generation</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Source</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_4">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Modulator:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="SourceModEn">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Filter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QComboBox" name="SourceFilter">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>81 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>130 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>213 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>345 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>550 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>910 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1480 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2370 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3840 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6200 MHz</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Step Attenuator:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QSpinBox" name="SourceStepAtt">
|
||||
<property name="maximum">
|
||||
<number>31</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Variable Attenuator:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QSlider" name="SourceVariableAttSlider">
|
||||
<property name="maximum">
|
||||
<number>1023</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SIUnitEdit" name="SourceVariableAttEntry"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>Amplifier 1:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QCheckBox" name="SourceAmp1En">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Amplifier 2:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="SourceAmp2En">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="SIUnitEdit" name="SourceFrequency"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Band Selection:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QComboBox" name="SourceBandsel">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>HF</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>LF</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>LF -20 dBm</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>LF -40 dBm</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="SourceLocked">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Locked</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="SourceRFEN">
|
||||
<property name="text">
|
||||
<string>RF Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="SourceCE">
|
||||
<property name="text">
|
||||
<string>Chip Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Port Selection:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QComboBox" name="SourcePortSel">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</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>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>LO PLL</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="SIUnitEdit" name="LOFrequency"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="LOMode">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Internal - HF</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Internal -LF</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>External</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="LOLocked">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Locked</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="LORFEN">
|
||||
<property name="text">
|
||||
<string>RF Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="LOCE">
|
||||
<property name="text">
|
||||
<string>Chip Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>Amplifier:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="LOAmpEn">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>DAC</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Enabled:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="DACEnable">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Output A Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="SIUnitEdit" name="DACFrequencyA"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Output A Amplitude:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="DACAmplitudeA">
|
||||
<property name="maximum">
|
||||
<number>2047</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Output A Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="SIUnitEdit" name="DACFrequencyB"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Output A Amplitude:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="DACAmplitudeB">
|
||||
<property name="maximum">
|
||||
<number>2047</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SIUnitEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>CustomWidgets/siunitedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -34,6 +34,7 @@ HEADERS += \
|
|||
Device/LibreVNA/librevnatcpdriver.h \
|
||||
Device/LibreVNA/librevnausbdriver.h \
|
||||
Device/LibreVNA/manualcontroldialogV1.h \
|
||||
Device/LibreVNA/manualcontroldialogvfd.h \
|
||||
Device/LibreVNA/manualcontroldialogvfe.h \
|
||||
Device/LibreVNA/manualcontroldialogvff.h \
|
||||
Device/LibreVNA/receivercaldialog.h \
|
||||
|
|
@ -199,6 +200,7 @@ SOURCES += \
|
|||
Device/LibreVNA/librevnatcpdriver.cpp \
|
||||
Device/LibreVNA/librevnausbdriver.cpp \
|
||||
Device/LibreVNA/manualcontroldialogV1.cpp \
|
||||
Device/LibreVNA/manualcontroldialogvfd.cpp \
|
||||
Device/LibreVNA/manualcontroldialogvfe.cpp \
|
||||
Device/LibreVNA/manualcontroldialogvff.cpp \
|
||||
Device/LibreVNA/receivercaldialog.cpp \
|
||||
|
|
@ -359,6 +361,7 @@ FORMS += \
|
|||
Device/LibreVNA/frequencycaldialog.ui \
|
||||
Device/LibreVNA/librevnadriversettingswidget.ui \
|
||||
Device/LibreVNA/manualcontroldialogV1.ui \
|
||||
Device/LibreVNA/manualcontroldialogvfd.ui \
|
||||
Device/LibreVNA/manualcontroldialogvfe.ui \
|
||||
Device/LibreVNA/manualcontroldialogvff.ui \
|
||||
Device/devicelog.ui \
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ SOURCES += \
|
|||
../LibreVNA-GUI/Device/LibreVNA/librevnatcpdriver.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogV1.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvfd.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvfe.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvff.cpp \
|
||||
../LibreVNA-GUI/Device/LibreVNA/receivercaldialog.cpp \
|
||||
|
|
@ -221,6 +222,7 @@ HEADERS += \
|
|||
../LibreVNA-GUI/Device/LibreVNA/librevnatcpdriver.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/librevnausbdriver.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogV1.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvfd.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvfe.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvff.h \
|
||||
../LibreVNA-GUI/Device/LibreVNA/receivercaldialog.h \
|
||||
|
|
@ -392,6 +394,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/manualcontroldialogvfd.ui \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvfe.ui \
|
||||
../LibreVNA-GUI/Device/LibreVNA/manualcontroldialogvff.ui \
|
||||
../LibreVNA-GUI/Device/devicelog.ui \
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
@echo off
|
||||
SetLocal EnableDelayedExpansion
|
||||
(set PATH=C:\Qt\6.2.4\mingw_64\bin;!PATH!)
|
||||
(set PATH=C:\Qt\6.8.0\mingw_64\bin;!PATH!)
|
||||
if defined QT_PLUGIN_PATH (
|
||||
set QT_PLUGIN_PATH=C:\Qt\6.2.4\mingw_64\plugins;!QT_PLUGIN_PATH!
|
||||
set QT_PLUGIN_PATH=C:\Qt\6.8.0\mingw_64\plugins;!QT_PLUGIN_PATH!
|
||||
) else (
|
||||
set QT_PLUGIN_PATH=C:\Qt\6.2.4\mingw_64\plugins
|
||||
set QT_PLUGIN_PATH=C:\Qt\6.8.0\mingw_64\plugins
|
||||
)
|
||||
%*
|
||||
EndLocal
|
||||
|
|
|
|||
|
|
@ -320,6 +320,38 @@ using ManualControl = struct _manualControl {
|
|||
uint32_t Samples;
|
||||
uint8_t WindowType :2;
|
||||
} V1;
|
||||
struct {
|
||||
uint64_t SourceFrequency;
|
||||
|
||||
uint8_t SourceCE :1;
|
||||
uint8_t SourceRFEN :1;
|
||||
uint8_t SourceModEn :1;
|
||||
uint8_t SourceAmp1En :1;
|
||||
uint8_t SourceAmp2En :1;
|
||||
uint8_t SourceBandSel :2;
|
||||
uint8_t DACEn :1;
|
||||
|
||||
uint16_t SourceFilter :4;
|
||||
uint16_t SourceVariableAttenuator :10;
|
||||
uint16_t SourcePortSel :2;
|
||||
|
||||
uint8_t SourceStepAttenuator :5;
|
||||
|
||||
uint8_t LOCE :1;
|
||||
uint8_t LORFEN :1;
|
||||
uint8_t LOAmplifierEN :1;
|
||||
|
||||
uint8_t LOMode :2;
|
||||
uint8_t padding1 :6;
|
||||
|
||||
uint64_t LOFrequency;
|
||||
|
||||
// DAC
|
||||
uint32_t DACFreqA;
|
||||
uint32_t DACFreqB;
|
||||
uint16_t DACAmpA;
|
||||
uint16_t DACAmpB;
|
||||
} VFD;
|
||||
struct {
|
||||
// Source
|
||||
uint8_t SourceCE :1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue