mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 08:24:43 -04:00
Massive UI revamping (v7): devices basic
This commit is contained in:
@@ -44,9 +44,11 @@ AirspyGui::AirspyGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (AirspyInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#AirspyGui { border: 1px solid #C06900 }");
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
|
||||
@@ -65,6 +67,7 @@ AirspyGui::AirspyGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
AirspyGui::~AirspyGui()
|
||||
@@ -447,3 +450,22 @@ void AirspyGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void AirspyGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &AirspyGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &AirspyGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &AirspyGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &AirspyGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->sampleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AirspyGui::on_sampleRate_currentIndexChanged);
|
||||
QObject::connect(ui->biasT, &QCheckBox::stateChanged, this, &AirspyGui::on_biasT_stateChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AirspyGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AirspyGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->lna, &QSlider::valueChanged, this, &AirspyGui::on_lna_valueChanged);
|
||||
QObject::connect(ui->mix, &QSlider::valueChanged, this, &AirspyGui::on_mix_valueChanged);
|
||||
QObject::connect(ui->vga, &QSlider::valueChanged, this, &AirspyGui::on_vga_valueChanged);
|
||||
QObject::connect(ui->lnaAGC, &QCheckBox::stateChanged, this, &AirspyGui::on_lnaAGC_stateChanged);
|
||||
QObject::connect(ui->mixAGC, &QCheckBox::stateChanged, this, &AirspyGui::on_mixAGC_stateChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &AirspyGui::on_startStop_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &AirspyGui::on_transverter_clicked);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,11 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
uint32_t getDevSampleRate(unsigned int index);
|
||||
int getDevSampleRateIndex(uint32_t sampleRate);
|
||||
|
||||
@@ -70,6 +75,7 @@ private:
|
||||
void updateSampleRateAndFrequency();
|
||||
void updateFrequencyLimits();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void on_centerFrequency_changed(quint64 value);
|
||||
|
||||
@@ -46,6 +46,7 @@ void AirspySettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray AirspySettings::serialize() const
|
||||
@@ -71,6 +72,8 @@ QByteArray AirspySettings::serialize() const
|
||||
s.writeU32(17, m_reverseAPIPort);
|
||||
s.writeU32(18, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(19, m_iqOrder);
|
||||
s.writeS32(20, m_workspaceIndex);
|
||||
s.writeBlob(21, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -118,6 +121,8 @@ bool AirspySettings::deserialize(const QByteArray& data)
|
||||
d.readU32(18, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(19, &m_iqOrder, true);
|
||||
d.readS32(20, &m_workspaceIndex, 0);
|
||||
d.readBlob(21, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ struct AirspySettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
AirspySettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -43,9 +43,12 @@ AirspyHFGui::AirspyHFGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (AirspyHFInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#AirspyHFGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/airspyhf/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
|
||||
@@ -64,6 +67,7 @@ AirspyHFGui::AirspyHFGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
AirspyHFGui::~AirspyHFGui()
|
||||
@@ -466,3 +470,21 @@ void AirspyHFGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void AirspyHFGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &AirspyHFGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &AirspyHFGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->resetLOppm, &QPushButton::clicked, this, &AirspyHFGui::on_resetLOppm_clicked);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &AirspyHFGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &AirspyHFGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->sampleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AirspyHFGui::on_sampleRate_currentIndexChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AirspyHFGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &AirspyHFGui::on_startStop_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &AirspyHFGui::on_transverter_clicked);
|
||||
QObject::connect(ui->band, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AirspyHFGui::on_band_currentIndexChanged);
|
||||
QObject::connect(ui->dsp, &ButtonSwitch::toggled, this, &AirspyHFGui::on_dsp_toggled);
|
||||
QObject::connect(ui->lna, &ButtonSwitch::toggled, this, &AirspyHFGui::on_lna_toggled);
|
||||
QObject::connect(ui->agc, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AirspyHFGui::on_agc_currentIndexChanged);
|
||||
QObject::connect(ui->att, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AirspyHFGui::on_att_currentIndexChanged);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,11 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
uint32_t getDevSampleRate(unsigned int index);
|
||||
int getDevSampleRateIndex(uint32_t sampleRate);
|
||||
|
||||
@@ -72,6 +77,7 @@ private:
|
||||
void updateSampleRateAndFrequency();
|
||||
void updateFrequencyLimits();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void on_centerFrequency_changed(quint64 value);
|
||||
|
||||
@@ -46,6 +46,7 @@ void AirspyHFSettings::resetToDefaults()
|
||||
m_attenuatorSteps = 0;
|
||||
m_dcBlock = false;
|
||||
m_iqCorrection = false;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray AirspyHFSettings::serialize() const
|
||||
@@ -70,6 +71,8 @@ QByteArray AirspyHFSettings::serialize() const
|
||||
s.writeBool(19, m_dcBlock);
|
||||
s.writeBool(20, m_iqCorrection);
|
||||
s.writeBool(21, m_iqOrder);
|
||||
s.writeS32(22, m_workspaceIndex);
|
||||
s.writeBlob(23, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -117,6 +120,8 @@ bool AirspyHFSettings::deserialize(const QByteArray& data)
|
||||
d.readBool(19, &m_dcBlock, false);
|
||||
d.readBool(20, &m_iqCorrection, false);
|
||||
d.readBool(21, &m_iqOrder, true);
|
||||
d.readS32(22, &m_workspaceIndex, 0);
|
||||
d.readBlob(23, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ struct AirspyHFSettings
|
||||
quint32 m_attenuatorSteps;
|
||||
bool m_dcBlock;
|
||||
bool m_iqCorrection;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
AirspyHFSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -40,9 +40,12 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource(nullptr),
|
||||
m_centerFrequency(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (AudioInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#AudioInputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/audioinput/readme.md";
|
||||
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
|
||||
@@ -50,6 +53,7 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@@ -306,3 +310,13 @@ void AudioInputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void AudioInputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->device, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioInputGui::on_device_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioInputGui::on_sampleRate_currentIndexChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioInputGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->volume, &QDial::valueChanged, this, &AudioInputGui::on_volume_valueChanged);
|
||||
QObject::connect(ui->channels, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioInputGui::on_channels_currentIndexChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &AudioInputGui::on_startStop_toggled);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::AudioInputGui* ui;
|
||||
@@ -68,6 +72,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -36,6 +36,7 @@ void AudioInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray AudioInputSettings::serialize() const
|
||||
@@ -47,6 +48,8 @@ QByteArray AudioInputSettings::serialize() const
|
||||
s.writeFloat(3, m_volume);
|
||||
s.writeU32(4, m_log2Decim);
|
||||
s.writeS32(5, (int)m_iqMapping);
|
||||
s.writeS32(6, m_workspaceIndex);
|
||||
s.writeBlob(7, m_geometryBytes);
|
||||
|
||||
s.writeBool(24, m_useReverseAPI);
|
||||
s.writeString(25, m_reverseAPIAddress);
|
||||
@@ -75,6 +78,8 @@ bool AudioInputSettings::deserialize(const QByteArray& data)
|
||||
d.readFloat(3, &m_volume, 1.0f);
|
||||
d.readU32(4, &m_log2Decim, 0);
|
||||
d.readS32(5, (int *)&m_iqMapping, IQMapping::L);
|
||||
d.readS32(6, &m_workspaceIndex, 0);
|
||||
d.readBlob(7, &m_geometryBytes);
|
||||
|
||||
d.readBool(24, &m_useReverseAPI, false);
|
||||
d.readString(25, &m_reverseAPIAddress, "127.0.0.1");
|
||||
|
||||
@@ -39,6 +39,8 @@ struct AudioInputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
AudioInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -45,9 +45,12 @@ Bladerf1InputGui::Bladerf1InputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleRate(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (Bladerf1Input*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#Bladerf1InputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/bladerf1input/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN_XB200/1000, BLADERF_FREQUENCY_MAX/1000);
|
||||
|
||||
@@ -74,6 +77,7 @@ Bladerf1InputGui::Bladerf1InputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
Bladerf1InputGui::~Bladerf1InputGui()
|
||||
@@ -525,3 +529,17 @@ void Bladerf1InputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void Bladerf1InputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &Bladerf1InputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &Bladerf1InputGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &Bladerf1InputGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &Bladerf1InputGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->bandwidth, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &Bladerf1InputGui::on_bandwidth_currentIndexChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &Bladerf1InputGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->lna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &Bladerf1InputGui::on_lna_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &Bladerf1InputGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &Bladerf1InputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &Bladerf1InputGui::on_sampleRateMode_toggled);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::Bladerf1InputGui* ui;
|
||||
@@ -70,6 +74,7 @@ private:
|
||||
void updateSampleRateAndFrequency();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -47,6 +47,7 @@ void BladeRF1InputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray BladeRF1InputSettings::serialize() const
|
||||
@@ -70,6 +71,8 @@ QByteArray BladeRF1InputSettings::serialize() const
|
||||
s.writeU32(15, m_reverseAPIPort);
|
||||
s.writeU32(16, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(17, m_iqOrder);
|
||||
s.writeS32(18, m_workspaceIndex);
|
||||
s.writeBlob(19, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -117,6 +120,8 @@ bool BladeRF1InputSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(16, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(17, &m_iqOrder);
|
||||
d.readS32(18, &m_workspaceIndex, 0);
|
||||
d.readBlob(19, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ struct BladeRF1InputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
BladeRF1InputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -45,12 +45,15 @@ BladeRF2InputGui::BladeRF2InputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleRate(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (BladeRF2Input*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
int max, min, step;
|
||||
float scale;
|
||||
uint64_t f_min, f_max;
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#Bladerf2InputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/bladerf2input/readme.md";
|
||||
|
||||
m_sampleSource->getFrequencyRange(f_min, f_max, step, scale);
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@@ -96,6 +99,7 @@ BladeRF2InputGui::BladeRF2InputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
BladeRF2InputGui::~BladeRF2InputGui()
|
||||
@@ -542,3 +546,21 @@ int BladeRF2InputGui::getGainValue(float gainDB)
|
||||
// gainDB, m_gainMin, m_gainMax, m_gainStep, m_gainScale, gain);
|
||||
return gain;
|
||||
}
|
||||
|
||||
void BladeRF2InputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &BladeRF2InputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &BladeRF2InputGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &BladeRF2InputGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &BladeRF2InputGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &BladeRF2InputGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->biasTee, &ButtonSwitch::toggled, this, &BladeRF2InputGui::on_biasTee_toggled);
|
||||
QObject::connect(ui->bandwidth, &ValueDial::changed, this, &BladeRF2InputGui::on_bandwidth_changed);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2InputGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2InputGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2InputGui::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &BladeRF2InputGui::on_gain_valueChanged);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &BladeRF2InputGui::on_transverter_clicked);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &BladeRF2InputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &BladeRF2InputGui::on_sampleRateMode_toggled);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ public:
|
||||
virtual QByteArray serialize() const;
|
||||
virtual bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::Bladerf2InputGui* ui;
|
||||
@@ -77,6 +81,7 @@ private:
|
||||
int getGainValue(float gainDB);
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -44,6 +44,7 @@ void BladeRF2InputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray BladeRF2InputSettings::serialize() const
|
||||
@@ -67,6 +68,8 @@ QByteArray BladeRF2InputSettings::serialize() const
|
||||
s.writeU32(15, m_reverseAPIPort);
|
||||
s.writeU32(16, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(17, m_iqOrder);
|
||||
s.writeS32(18, m_workspaceIndex);
|
||||
s.writeBlob(19, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -112,6 +115,8 @@ bool BladeRF2InputSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(16, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(17, &m_iqOrder, true);
|
||||
d.readS32(18, &m_workspaceIndex, 0);
|
||||
d.readBlob(19, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ struct BladeRF2InputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
BladeRF2InputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -41,9 +41,12 @@ FCDProGui::FCDProGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource(NULL),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (FCDProInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#FCDProGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/fcdpro/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
|
||||
@@ -151,6 +154,7 @@ FCDProGui::FCDProGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@@ -550,3 +554,26 @@ void FCDProGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void FCDProGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &FCDProGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ppm, &QSlider::valueChanged, this, &FCDProGui::on_ppm_valueChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &FCDProGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &FCDProGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->lnaGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_lnaGain_currentIndexChanged);
|
||||
QObject::connect(ui->rfFilter, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_rfFilter_currentIndexChanged);
|
||||
QObject::connect(ui->lnaEnhance, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_lnaEnhance_currentIndexChanged);
|
||||
QObject::connect(ui->band, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_band_currentIndexChanged);
|
||||
QObject::connect(ui->mixGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_mixGain_currentIndexChanged);
|
||||
QObject::connect(ui->mixFilter, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_mixFilter_currentIndexChanged);
|
||||
QObject::connect(ui->bias, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_bias_currentIndexChanged);
|
||||
QObject::connect(ui->mode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_mode_currentIndexChanged);
|
||||
QObject::connect(ui->rcFilter, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_rcFilter_currentIndexChanged);
|
||||
QObject::connect(ui->ifFilter, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_ifFilter_currentIndexChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->setDefaults, &QPushButton::clicked, this, &FCDProGui::on_setDefaults_clicked);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &FCDProGui::on_startStop_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &FCDProGui::on_transverter_clicked);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::FCDProGui* ui;
|
||||
@@ -68,6 +72,7 @@ private:
|
||||
void updateSampleRateAndFrequency();
|
||||
void updateFrequencyLimits();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -55,6 +55,7 @@ void FCDProSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray FCDProSettings::serialize() const
|
||||
@@ -89,6 +90,8 @@ QByteArray FCDProSettings::serialize() const
|
||||
s.writeU32(26, m_reverseAPIPort);
|
||||
s.writeU32(27, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(28, m_iqOrder);
|
||||
s.writeS32(29, m_workspaceIndex);
|
||||
s.writeBlob(30, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -145,6 +148,8 @@ bool FCDProSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(27, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(28, &m_iqOrder, true);
|
||||
d.readS32(29, &m_workspaceIndex, 0);
|
||||
d.readBlob(30, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,8 @@ struct FCDProSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
FCDProSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -42,9 +42,12 @@ FCDProPlusGui::FCDProPlusGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource(NULL),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (FCDProPlusInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#FCDProPlusGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/fcdproplus/readme.md";
|
||||
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
@@ -69,6 +72,7 @@ FCDProPlusGui::FCDProPlusGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@@ -372,3 +376,21 @@ void FCDProPlusGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void FCDProPlusGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &FCDProPlusGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProPlusGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProPlusGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &FCDProPlusGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &FCDProPlusGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->checkBoxG, &QCheckBox::stateChanged, this, &FCDProPlusGui::on_checkBoxG_stateChanged);
|
||||
QObject::connect(ui->checkBoxB, &QCheckBox::stateChanged, this, &FCDProPlusGui::on_checkBoxB_stateChanged);
|
||||
QObject::connect(ui->mixGain, &QCheckBox::stateChanged, this, &FCDProPlusGui::on_mixGain_stateChanged);
|
||||
QObject::connect(ui->ifGain, &QSlider::valueChanged, this, &FCDProPlusGui::on_ifGain_valueChanged);
|
||||
QObject::connect(ui->filterRF, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProPlusGui::on_filterRF_currentIndexChanged);
|
||||
QObject::connect(ui->filterIF, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FCDProPlusGui::on_filterIF_currentIndexChanged);
|
||||
QObject::connect(ui->ppm, &QSlider::valueChanged, this, &FCDProPlusGui::on_ppm_valueChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &FCDProPlusGui::on_startStop_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &FCDProPlusGui::on_transverter_clicked);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::FCDProPlusGui* ui;
|
||||
@@ -67,6 +71,7 @@ private:
|
||||
void updateSampleRateAndFrequency();
|
||||
void updateFrequencyLimits();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -46,6 +46,7 @@ void FCDProPlusSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray FCDProPlusSettings::serialize() const
|
||||
@@ -70,6 +71,8 @@ QByteArray FCDProPlusSettings::serialize() const
|
||||
s.writeU32(16, m_reverseAPIPort);
|
||||
s.writeU32(17, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(18, m_iqOrder);
|
||||
s.writeS32(19, m_workspaceIndex);
|
||||
s.writeBlob(20, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -116,6 +119,8 @@ bool FCDProPlusSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(17, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(18, &m_iqOrder, true);
|
||||
d.readS32(19, &m_workspaceIndex, 0);
|
||||
d.readBlob(20, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ struct FCDProPlusSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
FCDProPlusSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -55,7 +55,10 @@ FileInputGUI::FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_enableNavTime(false),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#FileInputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/fileinput/readme.md";
|
||||
ui->crcLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
|
||||
connect(&(m_deviceUISet->m_deviceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@@ -75,11 +78,15 @@ FileInputGUI::FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
FileInputGUI::~FileInputGUI()
|
||||
{
|
||||
qDebug("FileInputGUI::~FileInputGUI");
|
||||
delete ui;
|
||||
qDebug("FileInputGUI::~FileInputGUI: end");
|
||||
}
|
||||
|
||||
void FileInputGUI::destroy()
|
||||
@@ -444,3 +451,13 @@ void FileInputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void FileInputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &FileInputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->playLoop, &ButtonSwitch::toggled, this, &FileInputGUI::on_playLoop_toggled);
|
||||
QObject::connect(ui->play, &ButtonSwitch::toggled, this, &FileInputGUI::on_play_toggled);
|
||||
QObject::connect(ui->navTimeSlider, &QSlider::valueChanged, this, &FileInputGUI::on_navTimeSlider_valueChanged);
|
||||
QObject::connect(ui->showFileDialog, &QPushButton::clicked, this, &FileInputGUI::on_showFileDialog_clicked);
|
||||
QObject::connect(ui->acceleration, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FileInputGUI::on_acceleration_currentIndexChanged);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class FileInputGUI : public DeviceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
explicit FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent = nullptr);
|
||||
virtual ~FileInputGUI();
|
||||
virtual void destroy();
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual bool handleMessage(const Message& message);
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::FileInputGUI* ui;
|
||||
@@ -81,6 +85,7 @@ private:
|
||||
void updateWithStreamTime();
|
||||
void setAccelerationCombo();
|
||||
void setNumberStr(int n, QString& s);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>377</width>
|
||||
<height>190</height>
|
||||
<width>360</width>
|
||||
<height>202</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -18,8 +18,8 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>246</width>
|
||||
<height>190</height>
|
||||
<width>360</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@@ -592,23 +592,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="padLayout">
|
||||
<item>
|
||||
<spacer name="verticaPadlSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
||||
@@ -36,6 +36,7 @@ void FileInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray FileInputSettings::serialize() const
|
||||
@@ -48,6 +49,8 @@ QByteArray FileInputSettings::serialize() const
|
||||
s.writeString(5, m_reverseAPIAddress);
|
||||
s.writeU32(6, m_reverseAPIPort);
|
||||
s.writeU32(7, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(8, m_workspaceIndex);
|
||||
s.writeBlob(9, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -80,6 +83,8 @@ bool FileInputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(7, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(8, &m_workspaceIndex, 0);
|
||||
d.readBlob(9, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ struct FileInputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
static const unsigned int m_accelerationMaxScale; //!< Max power of 10 multiplier to 2,5,10 base ex: 2 -> 2,5,10,20,50,100,200,500,1000
|
||||
|
||||
|
||||
@@ -46,9 +46,12 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource(NULL),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (HackRFInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#HackRFInputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/hackrfinput/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, 0U, 7250000U);
|
||||
|
||||
@@ -69,6 +72,7 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
HackRFInputGui::~HackRFInputGui()
|
||||
@@ -506,3 +510,23 @@ void HackRFInputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void HackRFInputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &HackRFInputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &HackRFInputGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &HackRFInputGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &HackRFInputGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &HackRFInputGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->autoBBF, &ButtonSwitch::toggled, this, &HackRFInputGui::on_autoBBF_toggled);
|
||||
QObject::connect(ui->biasT, &QCheckBox::stateChanged, this, &HackRFInputGui::on_biasT_stateChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &HackRFInputGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &HackRFInputGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->lnaExt, &QCheckBox::stateChanged, this, &HackRFInputGui::on_lnaExt_stateChanged);
|
||||
QObject::connect(ui->lna, &QSlider::valueChanged, this, &HackRFInputGui::on_lna_valueChanged);
|
||||
QObject::connect(ui->bbFilter, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &HackRFInputGui::on_bbFilter_currentIndexChanged);
|
||||
QObject::connect(ui->vga, &QSlider::valueChanged, this, &HackRFInputGui::on_vga_valueChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &HackRFInputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &HackRFInputGui::on_sampleRateMode_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &HackRFInputGui::on_transverter_clicked);
|
||||
}
|
||||
|
||||
@@ -54,6 +54,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::HackRFInputGui* ui;
|
||||
@@ -80,6 +84,7 @@ private:
|
||||
void updateFrequencyLimits();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -48,6 +48,7 @@ void HackRFInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray HackRFInputSettings::serialize() const
|
||||
@@ -73,6 +74,8 @@ QByteArray HackRFInputSettings::serialize() const
|
||||
s.writeS64(19, m_transverterDeltaFrequency);
|
||||
s.writeBool(20, m_iqOrder);
|
||||
s.writeBool(21, m_autoBBF);
|
||||
s.writeS32(22, m_workspaceIndex);
|
||||
s.writeBlob(23, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -120,6 +123,8 @@ bool HackRFInputSettings::deserialize(const QByteArray& data)
|
||||
d.readS64(19, &m_transverterDeltaFrequency, 0);
|
||||
d.readBool(20, &m_iqOrder, true);
|
||||
d.readBool(21, &m_autoBBF, true);
|
||||
d.readS32(22, &m_workspaceIndex, 0);
|
||||
d.readBlob(23, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ struct HackRFInputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
HackRFInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -52,6 +52,7 @@ KiwiSDRGui::KiwiSDRGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
qDebug("KiwiSDRGui::KiwiSDRGui");
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
m_statusTooltips.push_back("Idle"); // 0
|
||||
@@ -66,11 +67,14 @@ KiwiSDRGui::KiwiSDRGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusColors.push_back("rgb(232, 85, 85)"); // Error (red)
|
||||
m_statusColors.push_back("rgb(232, 85, 232)"); // Disconnected (magenta)
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#KiwiSDRGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/kiwisdr/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, 0, 9999999);
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
@@ -313,3 +317,14 @@ void KiwiSDRGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void KiwiSDRGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &KiwiSDRGui::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &KiwiSDRGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &KiwiSDRGui::on_gain_valueChanged);
|
||||
QObject::connect(ui->agc, &QToolButton::toggled, this, &KiwiSDRGui::on_agc_toggled);
|
||||
QObject::connect(ui->serverAddress, &QLineEdit::returnPressed, this, &KiwiSDRGui::on_serverAddress_returnPressed);
|
||||
QObject::connect(ui->serverAddressApplyButton, &QPushButton::clicked, this, &KiwiSDRGui::on_serverAddressApplyButton_clicked);
|
||||
QObject::connect(ui->dcBlock, &ButtonSwitch::toggled, this, &KiwiSDRGui::on_dcBlock_toggled);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::KiwiSDRGui* ui;
|
||||
@@ -70,6 +74,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -38,6 +38,8 @@ void KiwiSDRSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray KiwiSDRSettings::serialize() const
|
||||
@@ -47,6 +49,8 @@ QByteArray KiwiSDRSettings::serialize() const
|
||||
s.writeString(2, m_serverAddress);
|
||||
s.writeU32(3, m_gain);
|
||||
s.writeBool(4, m_useAGC);
|
||||
s.writeS32(5, m_workspaceIndex);
|
||||
s.writeBlob(6, m_geometryBytes);
|
||||
|
||||
s.writeBool(100, m_useReverseAPI);
|
||||
s.writeString(101, m_reverseAPIAddress);
|
||||
@@ -73,6 +77,8 @@ bool KiwiSDRSettings::deserialize(const QByteArray& data)
|
||||
d.readString(2, &m_serverAddress, "127.0.0.1:8073");
|
||||
d.readU32(3, &m_gain, 20);
|
||||
d.readBool(4, &m_useAGC, true);
|
||||
d.readS32(5, &m_workspaceIndex, 0);
|
||||
d.readBlob(6, &m_geometryBytes);
|
||||
|
||||
d.readBool(100, &m_useReverseAPI, false);
|
||||
d.readString(101, &m_reverseAPIAddress, "127.0.0.1");
|
||||
|
||||
@@ -35,6 +35,9 @@ struct KiwiSDRSettings {
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
KiwiSDRSettings();
|
||||
void resetToDefaults();
|
||||
QByteArray serialize() const;
|
||||
|
||||
@@ -46,9 +46,12 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusCounter(0),
|
||||
m_deviceStatusCounter(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_limeSDRInput = (LimeSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#LimeSDRInputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/limesdrinput/readme.md";
|
||||
|
||||
float minF, maxF;
|
||||
|
||||
@@ -93,6 +96,7 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusTimer.start(500);
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_limeSDRInput->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@@ -718,3 +722,28 @@ void LimeSDRInputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void LimeSDRInputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &LimeSDRInputGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ncoFrequency, &ValueDialZ::changed, this, &LimeSDRInputGUI::on_ncoFrequency_changed);
|
||||
QObject::connect(ui->ncoEnable, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_ncoEnable_toggled);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &LimeSDRInputGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->hwDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRInputGUI::on_hwDecim_currentIndexChanged);
|
||||
QObject::connect(ui->swDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRInputGUI::on_swDecim_currentIndexChanged);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &LimeSDRInputGUI::on_lpf_changed);
|
||||
QObject::connect(ui->lpFIREnable, &ButtonSwitch::toggled, this, &LimeSDRInputGUI::on_lpFIREnable_toggled);
|
||||
QObject::connect(ui->lpFIR, &ValueDial::changed, this, &LimeSDRInputGUI::on_lpFIR_changed);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRInputGUI::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QDial::valueChanged, this, &LimeSDRInputGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->lnaGain, &QDial::valueChanged, this, &LimeSDRInputGUI::on_lnaGain_valueChanged);
|
||||
QObject::connect(ui->tiaGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRInputGUI::on_tiaGain_currentIndexChanged);
|
||||
QObject::connect(ui->pgaGain, &QDial::valueChanged, this, &LimeSDRInputGUI::on_pgaGain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRInputGUI::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->extClock, &ExternalClockButton::clicked, this, &LimeSDRInputGUI::on_extClock_clicked);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &LimeSDRInputGUI::on_transverter_clicked);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &LimeSDRInputGUI::on_sampleRateMode_toggled);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::LimeSDRInputGUI* ui;
|
||||
@@ -74,6 +78,7 @@ private:
|
||||
void updateFrequencyLimits();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -53,6 +53,7 @@ void LimeSDRInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray LimeSDRInputSettings::serialize() const
|
||||
@@ -86,6 +87,9 @@ QByteArray LimeSDRInputSettings::serialize() const
|
||||
s.writeU32(26, m_reverseAPIPort);
|
||||
s.writeU32(27, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(28, m_iqOrder);
|
||||
s.writeS32(29, m_workspaceIndex);
|
||||
s.writeBlob(30, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
@@ -143,6 +147,8 @@ bool LimeSDRInputSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(27, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(28, &m_iqOrder, true);
|
||||
d.readS32(29, &m_workspaceIndex, 0);
|
||||
d.readBlob(20, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ struct LimeSDRInputSettings
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
LimeSDRInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -70,16 +70,20 @@ LocalInputGui::LocalInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_doApplySettings(true),
|
||||
m_forceSettings(true)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_paletteGreenText.setColor(QPalette::WindowText, Qt::green);
|
||||
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
|
||||
|
||||
m_startingTimeStampms = 0;
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#LocalInputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/localinput/readme.md";
|
||||
|
||||
CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop);
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
m_statusTimer.start(500);
|
||||
@@ -321,3 +325,10 @@ void LocalInputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void LocalInputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &LocalInputGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &LocalInputGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &LocalInputGui::on_startStop_toggled);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::LocalInputGui* ui;
|
||||
@@ -100,6 +104,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -31,6 +31,7 @@ void LocalInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray LocalInputSettings::serialize() const
|
||||
@@ -43,6 +44,8 @@ QByteArray LocalInputSettings::serialize() const
|
||||
s.writeString(4, m_reverseAPIAddress);
|
||||
s.writeU32(5, m_reverseAPIPort);
|
||||
s.writeU32(6, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(7, m_workspaceIndex);
|
||||
s.writeBlob(8, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -75,6 +78,9 @@ bool LocalInputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(6, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(7, &m_workspaceIndex, 0);
|
||||
d.readBlob(8, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -28,6 +28,8 @@ struct LocalInputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
LocalInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -41,9 +41,12 @@ PerseusGui::PerseusGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (PerseusInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#PerseusGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/perseus/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
|
||||
@@ -62,6 +65,7 @@ PerseusGui::PerseusGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
PerseusGui::~PerseusGui()
|
||||
@@ -390,3 +394,18 @@ void PerseusGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void PerseusGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &PerseusGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &PerseusGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->resetLOppm, &QPushButton::clicked, this, &PerseusGui::on_resetLOppm_clicked);
|
||||
QObject::connect(ui->sampleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PerseusGui::on_sampleRate_currentIndexChanged);
|
||||
QObject::connect(ui->wideband, &ButtonSwitch::toggled, this, &PerseusGui::on_wideband_toggled);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PerseusGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &PerseusGui::on_startStop_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &PerseusGui::on_transverter_clicked);
|
||||
QObject::connect(ui->attenuator, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PerseusGui::on_attenuator_currentIndexChanged);
|
||||
QObject::connect(ui->adcDither, &ButtonSwitch::toggled, this, &PerseusGui::on_adcDither_toggled);
|
||||
QObject::connect(ui->adcPreamp, &ButtonSwitch::toggled, this, &PerseusGui::on_adcPreamp_toggled);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,11 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
uint32_t getDevSampleRate(unsigned int index);
|
||||
int getDevSampleRateIndex(uint32_t sampleRate);
|
||||
|
||||
@@ -70,6 +75,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void on_centerFrequency_changed(quint64 value);
|
||||
|
||||
@@ -41,6 +41,7 @@ void PerseusSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray PerseusSettings::serialize() const
|
||||
@@ -61,6 +62,8 @@ QByteArray PerseusSettings::serialize() const
|
||||
s.writeU32(12, m_reverseAPIPort);
|
||||
s.writeU32(13, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(14, m_iqOrder);
|
||||
s.writeS32(15, m_workspaceIndex);
|
||||
s.writeBlob(16, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -109,6 +112,8 @@ bool PerseusSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(13, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(14, &m_iqOrder, true);
|
||||
d.readS32(15, &m_workspaceIndex, 0);
|
||||
d.readBlob(16, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ struct PerseusSettings
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
PerseusSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -46,9 +46,12 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_doApplySettings(true),
|
||||
m_statusCounter(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (PlutoSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#PlutoSDRInputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/plutosdrinput/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
|
||||
@@ -72,6 +75,7 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
blockApplySettings(false);
|
||||
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
@@ -565,3 +569,28 @@ void PlutoSDRInputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void PlutoSDRInputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &PlutoSDRInputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &PlutoSDRInputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->loPPM, &QSlider::valueChanged, this, &PlutoSDRInputGui::on_loPPM_valueChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &PlutoSDRInputGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->rfDCOffset, &ButtonSwitch::toggled, this, &PlutoSDRInputGui::on_rfDCOffset_toggled);
|
||||
QObject::connect(ui->bbDCOffset, &ButtonSwitch::toggled, this, &PlutoSDRInputGui::on_bbDCOffset_toggled);
|
||||
QObject::connect(ui->hwIQImbalance, &ButtonSwitch::toggled, this, &PlutoSDRInputGui::on_hwIQImbalance_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &PlutoSDRInputGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->swDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRInputGui::on_swDecim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRInputGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &PlutoSDRInputGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &PlutoSDRInputGui::on_lpf_changed);
|
||||
QObject::connect(ui->lpFIREnable, &ButtonSwitch::toggled, this, &PlutoSDRInputGui::on_lpFIREnable_toggled);
|
||||
QObject::connect(ui->lpFIR, &ValueDial::changed, this, &PlutoSDRInputGui::on_lpFIR_changed);
|
||||
QObject::connect(ui->lpFIRDecimation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRInputGui::on_lpFIRDecimation_currentIndexChanged);
|
||||
QObject::connect(ui->lpFIRGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRInputGui::on_lpFIRGain_currentIndexChanged);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRInputGui::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QDial::valueChanged, this, &PlutoSDRInputGui::on_gain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRInputGui::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &PlutoSDRInputGui::on_transverter_clicked);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &PlutoSDRInputGui::on_sampleRateMode_toggled);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,10 @@ public:
|
||||
virtual QByteArray serialize() const;
|
||||
virtual bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::PlutoSDRInputGUI* ui;
|
||||
@@ -74,6 +78,7 @@ private:
|
||||
void setSampleRateLimits();
|
||||
void updateFrequencyLimits();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void on_startStop_toggled(bool checked);
|
||||
|
||||
@@ -53,6 +53,7 @@ void PlutoSDRInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray PlutoSDRInputSettings::serialize() const
|
||||
@@ -83,6 +84,8 @@ QByteArray PlutoSDRInputSettings::serialize() const
|
||||
s.writeBool(23, m_hwRFDCBlock);
|
||||
s.writeBool(24, m_hwIQCorrection);
|
||||
s.writeBool(25, m_iqOrder);
|
||||
s.writeS32(26, m_workspaceIndex);
|
||||
s.writeBlob(27, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -155,6 +158,8 @@ bool PlutoSDRInputSettings::deserialize(const QByteArray& data)
|
||||
d.readBool(23, &m_hwRFDCBlock, true);
|
||||
d.readBool(24, &m_hwIQCorrection, true);
|
||||
d.readBool(25, &m_iqOrder, true);
|
||||
d.readS32(26, &m_workspaceIndex, 0);
|
||||
d.readBlob(27, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -83,6 +83,8 @@ struct PlutoSDRInputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
PlutoSDRInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -67,11 +67,14 @@ RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_doApplySettings(true),
|
||||
m_forceSettings(true)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_paletteGreenText.setColor(QPalette::WindowText, Qt::green);
|
||||
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
|
||||
|
||||
m_startingTimeStampms = 0;
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#RemoteInputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/remoteinput/readme.md";
|
||||
|
||||
ui->remoteDeviceFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->remoteDeviceFrequency->setValueRange(8, 0, 99999999);
|
||||
@@ -97,6 +100,7 @@ RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
|
||||
m_forceSettings = true;
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
RemoteInputGui::~RemoteInputGui()
|
||||
@@ -684,3 +688,22 @@ void RemoteInputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void RemoteInputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->remoteDeviceFrequency, &ValueDial::changed, this, &RemoteInputGui::on_remoteDeviceFrequency_changed);
|
||||
QObject::connect(ui->decimationFactor, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RemoteInputGui::on_decimationFactor_currentIndexChanged);
|
||||
QObject::connect(ui->position, &QSlider::valueChanged, this, &RemoteInputGui::on_position_valueChanged);
|
||||
QObject::connect(ui->apiApplyButton, &QPushButton::clicked, this, &RemoteInputGui::on_apiApplyButton_clicked);
|
||||
QObject::connect(ui->dataApplyButton, &QPushButton::clicked, this, &RemoteInputGui::on_dataApplyButton_clicked);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &RemoteInputGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &RemoteInputGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->apiAddress, &QLineEdit::editingFinished, this, &RemoteInputGui::on_apiAddress_editingFinished);
|
||||
QObject::connect(ui->apiPort, &QLineEdit::editingFinished, this, &RemoteInputGui::on_apiPort_editingFinished);
|
||||
QObject::connect(ui->dataAddress, &QLineEdit::editingFinished, this, &RemoteInputGui::on_dataAddress_editingFinished);
|
||||
QObject::connect(ui->dataPort, &QLineEdit::editingFinished, this, &RemoteInputGui::on_dataPort_editingFinished);
|
||||
QObject::connect(ui->multicastAddress, &QLineEdit::editingFinished, this, &RemoteInputGui::on_multicastAddress_editingFinished);
|
||||
QObject::connect(ui->multicastJoin, &ButtonSwitch::toggled, this, &RemoteInputGui::on_multicastJoin_toggled);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &RemoteInputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->eventCountsReset, &QPushButton::clicked, this, &RemoteInputGui::on_eventCountsReset_clicked);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::RemoteInputGui* ui;
|
||||
@@ -116,6 +120,7 @@ private:
|
||||
void applyPosition();
|
||||
void applyRemoteSettings();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -37,6 +37,7 @@ void RemoteInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray RemoteInputSettings::serialize() const
|
||||
@@ -55,6 +56,8 @@ QByteArray RemoteInputSettings::serialize() const
|
||||
s.writeString(12, m_reverseAPIAddress);
|
||||
s.writeU32(13, m_reverseAPIPort);
|
||||
s.writeU32(14, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(15, m_workspaceIndex);
|
||||
s.writeBlob(16, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -95,6 +98,9 @@ bool RemoteInputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(14, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(15, &m_workspaceIndex, 0);
|
||||
d.readBlob(16, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -34,6 +34,8 @@ struct RemoteInputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
RemoteInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -43,9 +43,12 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (RTLSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#RTLSDRGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/rtlsdr/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
|
||||
@@ -59,6 +62,7 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusTimer.start(500);
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
m_gains = m_sampleSource->getGains();
|
||||
displayGains();
|
||||
@@ -533,3 +537,24 @@ void RTLSDRGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void RTLSDRGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &RTLSDRGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &RTLSDRGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->offsetTuning, &QCheckBox::toggled, this, &RTLSDRGui::on_offsetTuning_toggled);
|
||||
QObject::connect(ui->rfBW, &ValueDial::changed, this, &RTLSDRGui::on_rfBW_changed);
|
||||
QObject::connect(ui->lowSampleRate, &ButtonSwitch::toggled, this, &RTLSDRGui::on_lowSampleRate_toggled);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &RTLSDRGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &RTLSDRGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RTLSDRGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RTLSDRGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->ppm, &QSlider::valueChanged, this, &RTLSDRGui::on_ppm_valueChanged);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &RTLSDRGui::on_gain_valueChanged);
|
||||
QObject::connect(ui->checkBox, &QCheckBox::stateChanged, this, &RTLSDRGui::on_checkBox_stateChanged);
|
||||
QObject::connect(ui->agc, &QCheckBox::stateChanged, this, &RTLSDRGui::on_agc_stateChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &RTLSDRGui::on_startStop_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &RTLSDRGui::on_transverter_clicked);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &RTLSDRGui::on_sampleRateMode_toggled);
|
||||
QObject::connect(ui->biasT, &QCheckBox::stateChanged, this, &RTLSDRGui::on_biasT_stateChanged);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::RTLSDRGui* ui;
|
||||
@@ -73,6 +77,7 @@ private:
|
||||
void updateFrequencyLimits();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>320</width>
|
||||
<height>220</height>
|
||||
<width>360</width>
|
||||
<height>229</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -18,8 +18,8 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>220</height>
|
||||
<width>360</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@@ -251,6 +251,12 @@
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QComboBox" name="fcPos">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>55</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
@@ -636,44 +642,20 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="fillerLayout">
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ValueDial</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/valuedial.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TransverterButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
|
||||
@@ -47,6 +47,7 @@ void RTLSDRSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray RTLSDRSettings::serialize() const
|
||||
@@ -73,6 +74,8 @@ QByteArray RTLSDRSettings::serialize() const
|
||||
s.writeU32(19, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(20, m_iqOrder);
|
||||
s.writeBool(21, m_biasTee);
|
||||
s.writeS32(22, m_workspaceIndex);
|
||||
s.writeBlob(23, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -121,6 +124,8 @@ bool RTLSDRSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readBool(20, &m_iqOrder, true);
|
||||
d.readBool(21, &m_biasTee, false);
|
||||
d.readS32(22, &m_workspaceIndex, 0);
|
||||
d.readBlob(23, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ struct RTLSDRSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
RTLSDRSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -40,9 +40,12 @@ SDRPlayGui::SDRPlayGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_doApplySettings(true),
|
||||
m_forceSettings(true)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (SDRPlayInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#SDRPlayGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/sdrplay/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, 10U, 12000U);
|
||||
|
||||
@@ -78,6 +81,7 @@ SDRPlayGui::SDRPlayGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@@ -456,3 +460,24 @@ void SDRPlayGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRPlayGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &SDRPlayGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ppm, &QSlider::valueChanged, this, &SDRPlayGui::on_ppm_valueChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &SDRPlayGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &SDRPlayGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->fBand, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayGui::on_fBand_currentIndexChanged);
|
||||
QObject::connect(ui->bandwidth, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayGui::on_bandwidth_currentIndexChanged);
|
||||
QObject::connect(ui->samplerate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayGui::on_samplerate_currentIndexChanged);
|
||||
QObject::connect(ui->ifFrequency, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayGui::on_ifFrequency_currentIndexChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->gainTunerOn, &QRadioButton::toggled, this, &SDRPlayGui::on_gainTunerOn_toggled);
|
||||
QObject::connect(ui->gainTuner, &QDial::valueChanged, this, &SDRPlayGui::on_gainTuner_valueChanged);
|
||||
QObject::connect(ui->gainManualOn, &QRadioButton::toggled, this, &SDRPlayGui::on_gainManualOn_toggled);
|
||||
QObject::connect(ui->gainLNA, &ButtonSwitch::toggled, this, &SDRPlayGui::on_gainLNA_toggled);
|
||||
QObject::connect(ui->gainMixer, &ButtonSwitch::toggled, this, &SDRPlayGui::on_gainMixer_toggled);
|
||||
QObject::connect(ui->gainBaseband, &QDial::valueChanged, this, &SDRPlayGui::on_gainBaseband_valueChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &SDRPlayGui::on_startStop_toggled);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
virtual QByteArray serialize() const;
|
||||
virtual bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::SDRPlayGui* ui;
|
||||
@@ -67,6 +71,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void updateHardware();
|
||||
|
||||
@@ -47,6 +47,7 @@ void SDRPlaySettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray SDRPlaySettings::serialize() const
|
||||
@@ -72,6 +73,8 @@ QByteArray SDRPlaySettings::serialize() const
|
||||
s.writeU32(17, m_reverseAPIPort);
|
||||
s.writeU32(18, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(19, m_iqOrder);
|
||||
s.writeS32(20, m_workspaceIndex);
|
||||
s.writeBlob(21, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -119,6 +122,8 @@ bool SDRPlaySettings::deserialize(const QByteArray& data)
|
||||
d.readU32(18, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(19, &m_iqOrder, true);
|
||||
d.readS32(20, &m_workspaceIndex, 0);
|
||||
d.readBlob(21, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ struct SDRPlaySettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
SDRPlaySettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -40,9 +40,12 @@ SDRPlayV3Gui::SDRPlayV3Gui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_doApplySettings(true),
|
||||
m_forceSettings(true)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sdrPlayV3Input = (SDRPlayV3Input*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#SDRPlayV3Gui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/sdrplayv3/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
|
||||
@@ -114,6 +117,7 @@ SDRPlayV3Gui::SDRPlayV3Gui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
ui->antenna->blockSignals(false);
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_sdrPlayV3Input->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@@ -520,3 +524,28 @@ void SDRPlayV3Gui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRPlayV3Gui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &SDRPlayV3Gui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ppm, &QSlider::valueChanged, this, &SDRPlayV3Gui::on_ppm_valueChanged);
|
||||
QObject::connect(ui->tuner, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayV3Gui::on_tuner_currentIndexChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayV3Gui::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->extRef, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_extRef_toggled);
|
||||
QObject::connect(ui->biasTee, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_biasTee_toggled);
|
||||
QObject::connect(ui->amNotch, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_amNotch_toggled);
|
||||
QObject::connect(ui->fmNotch, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_fmNotch_toggled);
|
||||
QObject::connect(ui->dabNotch, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_dabNotch_toggled);
|
||||
QObject::connect(ui->bandwidth, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayV3Gui::on_bandwidth_currentIndexChanged);
|
||||
QObject::connect(ui->samplerate, &ValueDial::changed, this, &SDRPlayV3Gui::on_samplerate_changed);
|
||||
QObject::connect(ui->ifFrequency, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayV3Gui::on_ifFrequency_currentIndexChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayV3Gui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayV3Gui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->gainLNA, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SDRPlayV3Gui::on_gainLNA_currentIndexChanged);
|
||||
QObject::connect(ui->gainIFAGC, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_gainIFAGC_toggled);
|
||||
QObject::connect(ui->gainIF, &QDial::valueChanged, this, &SDRPlayV3Gui::on_gainIF_valueChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &SDRPlayV3Gui::on_startStop_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &SDRPlayV3Gui::on_transverter_clicked);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
virtual QByteArray serialize() const;
|
||||
virtual bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::SDRPlayV3Gui* ui;
|
||||
@@ -69,6 +73,7 @@ private:
|
||||
void updateSampleRateAndFrequency();
|
||||
void updateFrequencyLimits();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void updateHardware();
|
||||
|
||||
@@ -54,6 +54,7 @@ void SDRPlayV3Settings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray SDRPlayV3Settings::serialize() const
|
||||
@@ -85,6 +86,8 @@ QByteArray SDRPlayV3Settings::serialize() const
|
||||
s.writeBool(26, m_transverterMode);
|
||||
s.writeS64(27, m_transverterDeltaFrequency);
|
||||
s.writeBool(28, m_iqOrder);
|
||||
s.writeS32(29, m_workspaceIndex);
|
||||
s.writeBlob(30, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -138,6 +141,8 @@ bool SDRPlayV3Settings::deserialize(const QByteArray& data)
|
||||
d.readBool(26, &m_transverterMode, false);
|
||||
d.readS64(27, &m_transverterDeltaFrequency, 0);
|
||||
d.readBool(28, &m_iqOrder, true);
|
||||
d.readS32(29, &m_workspaceIndex, 0);
|
||||
d.readBlob(30, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,8 @@ struct SDRPlayV3Settings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
SDRPlayV3Settings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -61,7 +61,10 @@ SigMFFileInputGUI::SigMFFileInputGUI(DeviceUISet *deviceUISet, QWidget* parent)
|
||||
m_enableFullNavTime(false),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#SigMFFileInputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/sigmffileinput/readme.md";
|
||||
|
||||
ui->fileNameText->setText(m_metaFileName);
|
||||
ui->crcLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
@@ -76,6 +79,7 @@ SigMFFileInputGUI::SigMFFileInputGUI(DeviceUISet *deviceUISet, QWidget* parent)
|
||||
|
||||
setAccelerationCombo();
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
updateStartStop();
|
||||
|
||||
ui->trackNavTimeSlider->setEnabled(false);
|
||||
@@ -679,3 +683,18 @@ void SigMFFileInputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SigMFFileInputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &SigMFFileInputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->infoDetails, &QPushButton::clicked, this, &SigMFFileInputGUI::on_infoDetails_clicked);
|
||||
QObject::connect(ui->captureTable, &QTableWidget::itemSelectionChanged, this, &SigMFFileInputGUI::on_captureTable_itemSelectionChanged);
|
||||
QObject::connect(ui->trackNavTimeSlider, &QSlider::valueChanged, this, &SigMFFileInputGUI::on_trackNavTimeSlider_valueChanged);
|
||||
QObject::connect(ui->playTrack, &ButtonSwitch::toggled, this, &SigMFFileInputGUI::on_playTrack_toggled);
|
||||
QObject::connect(ui->playTrackLoop, &ButtonSwitch::toggled, this, &SigMFFileInputGUI::on_playTrackLoop_toggled);
|
||||
QObject::connect(ui->fullNavTimeSlider, &QSlider::valueChanged, this, &SigMFFileInputGUI::on_fullNavTimeSlider_valueChanged);
|
||||
QObject::connect(ui->playFull, &ButtonSwitch::toggled, this, &SigMFFileInputGUI::on_playFull_toggled);
|
||||
QObject::connect(ui->playFullLoop, &ButtonSwitch::toggled, this, &SigMFFileInputGUI::on_playFullLoop_toggled);
|
||||
QObject::connect(ui->showFileDialog, &QPushButton::clicked, this, &SigMFFileInputGUI::on_showFileDialog_clicked);
|
||||
QObject::connect(ui->acceleration, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SigMFFileInputGUI::on_acceleration_currentIndexChanged);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::SigMFFileInputGUI* ui;
|
||||
@@ -94,6 +98,7 @@ private:
|
||||
void setAccelerationCombo();
|
||||
void setNumberStr(int n, QString& s);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -36,6 +36,7 @@ void SigMFFileInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray SigMFFileInputSettings::serialize() const
|
||||
@@ -49,6 +50,8 @@ QByteArray SigMFFileInputSettings::serialize() const
|
||||
s.writeString(6, m_reverseAPIAddress);
|
||||
s.writeU32(7, m_reverseAPIPort);
|
||||
s.writeU32(8, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(9, m_workspaceIndex);
|
||||
s.writeBlob(10, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -82,6 +85,8 @@ bool SigMFFileInputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(8, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(9, &m_workspaceIndex, 0);
|
||||
d.readBlob(10, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ struct SigMFFileInputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
static const unsigned int m_accelerationMaxScale; //!< Max power of 10 multiplier to 2,5,10 base ex: 2 -> 2,5,10,20,50,100,200,500,1000
|
||||
|
||||
|
||||
@@ -59,8 +59,11 @@ SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_autoDCCorrection(0),
|
||||
m_autoIQCorrection(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = (SoapySDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#SoapySDRInputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/soapysdrinput/readme.md";
|
||||
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
uint64_t f_min, f_max;
|
||||
@@ -101,6 +104,7 @@ SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
SoapySDRInputGui::~SoapySDRInputGui()
|
||||
@@ -924,3 +928,15 @@ void SoapySDRInputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SoapySDRInputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &SoapySDRInputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &SoapySDRInputGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &SoapySDRInputGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &SoapySDRInputGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SoapySDRInputGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SoapySDRInputGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &SoapySDRInputGui::on_transverter_clicked);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &SoapySDRInputGui::on_startStop_toggled);
|
||||
}
|
||||
|
||||
@@ -51,6 +51,10 @@ public:
|
||||
virtual QByteArray serialize() const;
|
||||
virtual bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
void createRangesControl(
|
||||
@@ -64,6 +68,7 @@ private:
|
||||
void createIndividualGainsControl(const std::vector<DeviceSoapySDRParams::GainSetting>& individualGainsList);
|
||||
void createCorrectionsControl();
|
||||
void createArgumentsControl(const SoapySDR::ArgInfoList& argInfoList, bool deviceArguments);
|
||||
void makeUIConnections();
|
||||
|
||||
Ui::SoapySDRInputGui* ui;
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ void SoapySDRInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray SoapySDRInputSettings::serialize() const
|
||||
@@ -83,6 +84,8 @@ QByteArray SoapySDRInputSettings::serialize() const
|
||||
s.writeU32(25, m_reverseAPIPort);
|
||||
s.writeU32(26, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(27, m_iqOrder);
|
||||
s.writeS32(28, m_workspaceIndex);
|
||||
s.writeBlob(29, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -146,6 +149,8 @@ bool SoapySDRInputSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(26, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(27, &m_iqOrder, true);
|
||||
d.readS32(28, &m_workspaceIndex, 0);
|
||||
d.readBlob(29, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,8 @@ struct SoapySDRInputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
SoapySDRInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -51,9 +51,12 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
qDebug("TestSourceGui::TestSourceGui");
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSource = m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#TestSourceGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/testsource/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, 0, 9999999);
|
||||
ui->sampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow));
|
||||
@@ -63,6 +66,7 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
ui->frequencyShiftLabel->setText(QString("%1").arg(QChar(0x94, 0x03)));
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
@@ -503,3 +507,25 @@ void TestSourceGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void TestSourceGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &TestSourceGui::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &TestSourceGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->autoCorr, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestSourceGui::on_autoCorr_currentIndexChanged);
|
||||
QObject::connect(ui->frequencyShift, &ValueDialZ::changed, this, &TestSourceGui::on_frequencyShift_changed);
|
||||
QObject::connect(ui->decimation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestSourceGui::on_decimation_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestSourceGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &TestSourceGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->sampleSize, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestSourceGui::on_sampleSize_currentIndexChanged);
|
||||
QObject::connect(ui->amplitudeCoarse, &QSlider::valueChanged, this, &TestSourceGui::on_amplitudeCoarse_valueChanged);
|
||||
QObject::connect(ui->amplitudeFine, &QSlider::valueChanged, this, &TestSourceGui::on_amplitudeFine_valueChanged);
|
||||
QObject::connect(ui->modulation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestSourceGui::on_modulation_currentIndexChanged);
|
||||
QObject::connect(ui->modulationFrequency, &QDial::valueChanged, this, &TestSourceGui::on_modulationFrequency_valueChanged);
|
||||
QObject::connect(ui->amModulation, &QDial::valueChanged, this, &TestSourceGui::on_amModulation_valueChanged);
|
||||
QObject::connect(ui->fmDeviation, &QDial::valueChanged, this, &TestSourceGui::on_fmDeviation_valueChanged);
|
||||
QObject::connect(ui->dcBias, &QSlider::valueChanged, this, &TestSourceGui::on_dcBias_valueChanged);
|
||||
QObject::connect(ui->iBias, &QSlider::valueChanged, this, &TestSourceGui::on_iBias_valueChanged);
|
||||
QObject::connect(ui->qBias, &QSlider::valueChanged, this, &TestSourceGui::on_qBias_valueChanged);
|
||||
QObject::connect(ui->phaseImbalance, &QSlider::valueChanged, this, &TestSourceGui::on_phaseImbalance_valueChanged);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::TestSourceGui* ui;
|
||||
@@ -71,6 +75,7 @@ private:
|
||||
void updateAmpFineLimit();
|
||||
void updateFrequencyShiftLimit();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -46,6 +46,7 @@ void TestSourceSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray TestSourceSettings::serialize() const
|
||||
@@ -71,6 +72,9 @@ QByteArray TestSourceSettings::serialize() const
|
||||
s.writeString(19, m_reverseAPIAddress);
|
||||
s.writeU32(20, m_reverseAPIPort);
|
||||
s.writeU32(21, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(22, m_workspaceIndex);
|
||||
s.writeBlob(23, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
@@ -132,6 +136,8 @@ bool TestSourceSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(21, &utmp, 0);
|
||||
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readS32(22, &m_workspaceIndex, 0);
|
||||
d.readBlob(23, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,8 @@ struct TestSourceSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
TestSourceSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -47,9 +47,12 @@ USRPInputGUI::USRPInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusCounter(0),
|
||||
m_deviceStatusCounter(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_usrpInput = (USRPInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#USRPInputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/usrpinput/readme.md";
|
||||
|
||||
float minF, maxF;
|
||||
|
||||
@@ -81,6 +84,7 @@ USRPInputGUI::USRPInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusTimer.start(500);
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_usrpInput->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@@ -620,3 +624,21 @@ void USRPInputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void USRPInputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &USRPInputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &USRPInputGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &USRPInputGUI::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &USRPInputGUI::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &USRPInputGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->swDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USRPInputGUI::on_swDecim_currentIndexChanged);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &USRPInputGUI::on_lpf_changed);
|
||||
QObject::connect(ui->loOffset, &ValueDialZ::changed, this, &USRPInputGUI::on_loOffset_changed);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USRPInputGUI::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &USRPInputGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USRPInputGUI::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->clockSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USRPInputGUI::on_clockSource_currentIndexChanged);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &USRPInputGUI::on_transverter_clicked);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &USRPInputGUI::on_sampleRateMode_toggled);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual bool handleMessage(const Message& message);
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::USRPInputGUI* ui;
|
||||
@@ -79,6 +82,8 @@ private:
|
||||
void updateSampleRate();
|
||||
void updateFrequencyLimits();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -44,6 +44,7 @@ void USRPInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray USRPInputSettings::serialize() const
|
||||
@@ -66,6 +67,9 @@ QByteArray USRPInputSettings::serialize() const
|
||||
s.writeU32(14, m_reverseAPIPort);
|
||||
s.writeU32(15, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(16, m_loOffset);
|
||||
s.writeS32(17, m_workspaceIndex);
|
||||
s.writeBlob(18, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
@@ -109,6 +113,8 @@ bool USRPInputSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(15, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(16, &m_loOffset, 0);
|
||||
d.readS32(17, &m_workspaceIndex, 0);
|
||||
d.readBlob(18, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,8 @@ struct USRPInputSettings
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
USRPInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
@@ -47,9 +47,12 @@ XTRXInputGUI::XTRXInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusCounter(0),
|
||||
m_deviceStatusCounter(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_XTRXInput = (XTRXInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#XTRXInputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesource/xtrxinput/readme.md";
|
||||
|
||||
float minF, maxF, stepF;
|
||||
|
||||
@@ -77,6 +80,7 @@ XTRXInputGUI::XTRXInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
@@ -647,3 +651,26 @@ void XTRXInputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void XTRXInputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &XTRXInputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &XTRXInputGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ncoFrequency, &ValueDialZ::changed, this, &XTRXInputGUI::on_ncoFrequency_changed);
|
||||
QObject::connect(ui->ncoEnable, &ButtonSwitch::toggled, this, &XTRXInputGUI::on_ncoEnable_toggled);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &XTRXInputGUI::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &XTRXInputGUI::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &XTRXInputGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->hwDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXInputGUI::on_hwDecim_currentIndexChanged);
|
||||
QObject::connect(ui->swDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXInputGUI::on_swDecim_currentIndexChanged);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &XTRXInputGUI::on_lpf_changed);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXInputGUI::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QDial::valueChanged, this, &XTRXInputGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->lnaGain, &QDial::valueChanged, this, &XTRXInputGUI::on_lnaGain_valueChanged);
|
||||
QObject::connect(ui->tiaGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXInputGUI::on_tiaGain_currentIndexChanged);
|
||||
QObject::connect(ui->pgaGain, &QDial::valueChanged, this, &XTRXInputGUI::on_pgaGain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXInputGUI::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->extClock, &ExternalClockButton::clicked, this, &XTRXInputGUI::on_extClock_clicked);
|
||||
QObject::connect(ui->pwrmode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXInputGUI::on_pwrmode_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &XTRXInputGUI::on_sampleRateMode_toggled);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,10 @@ public:
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }
|
||||
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }
|
||||
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
|
||||
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
|
||||
|
||||
private:
|
||||
Ui::XTRXInputGUI* ui;
|
||||
@@ -74,6 +78,7 @@ private:
|
||||
void updateADCRate();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
||||
@@ -48,6 +48,7 @@ void XTRXInputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray XTRXInputSettings::serialize() const
|
||||
@@ -76,6 +77,8 @@ QByteArray XTRXInputSettings::serialize() const
|
||||
s.writeU32(24, m_reverseAPIPort);
|
||||
s.writeU32(25, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(26, m_iqOrder);
|
||||
s.writeS32(27, m_workspaceIndex);
|
||||
s.writeBlob(28, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -127,6 +130,8 @@ bool XTRXInputSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(25, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(26, &m_iqOrder, true);
|
||||
d.readS32(27, &m_workspaceIndex, 0);
|
||||
d.readBlob(28, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,8 @@ struct XTRXInputSettings
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
XTRXInputSettings();
|
||||
void resetToDefaults();
|
||||
|
||||
Reference in New Issue
Block a user