mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-07-10 21:05:22 -04:00
Massive UI revamping (v7): devices basic
This commit is contained in:
parent
43f53fe26a
commit
aad90aeabc
plugins
channelmimo
beamsteeringcwmod
interferometer
samplemimo
bladerf2mimo
limesdrmimo
metismiso
plutosdrmimo
testmi
testmosync
xtrxmimo
samplesink
audiooutput
bladerf1output
bladerf2output
fileoutput
hackrfoutput
limesdroutput
localoutput
plutosdroutput
remoteoutput
soapysdroutput
testsink
usrpoutput
xtrxoutput
samplesource
@ -43,6 +43,7 @@ void BeamSteeringCWModSettings::resetToDefaults()
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_reverseAPIChannelIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray BeamSteeringCWModSettings::serialize() const
|
||||
@ -64,6 +65,9 @@ QByteArray BeamSteeringCWModSettings::serialize() const
|
||||
s.writeBlob(15, m_rollupState->serialize());
|
||||
}
|
||||
|
||||
s.writeS32(16, m_workspaceIndex);
|
||||
s.writeBlob(17, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
@ -114,6 +118,9 @@ bool BeamSteeringCWModSettings::deserialize(const QByteArray& data)
|
||||
m_rollupState->deserialize(bytetmp);
|
||||
}
|
||||
|
||||
d.readS32(16, &m_workspaceIndex);
|
||||
d.readBlob(17, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -36,6 +36,8 @@ struct BeamSteeringCWModSettings
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
uint16_t m_reverseAPIChannelIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
Serializable *m_channelMarker;
|
||||
Serializable *m_rollupState;
|
||||
|
@ -44,6 +44,7 @@ void InterferometerSettings::resetToDefaults()
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_reverseAPIChannelIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray InterferometerSettings::serialize() const
|
||||
@ -61,6 +62,8 @@ QByteArray InterferometerSettings::serialize() const
|
||||
s.writeU32(10, m_reverseAPIDeviceIndex);
|
||||
s.writeU32(11, m_reverseAPIChannelIndex);
|
||||
s.writeS32(12, m_phase);
|
||||
s.writeS32(13,m_workspaceIndex);
|
||||
s.writeBlob(14, m_geometryBytes);
|
||||
|
||||
if (m_spectrumGUI) {
|
||||
s.writeBlob(20, m_spectrumGUI->serialize());
|
||||
@ -117,6 +120,8 @@ bool InterferometerSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readS32(12, &tmp, 0);
|
||||
m_phase = tmp < -180 ? -180 : tmp > 180 ? 180 : tmp;
|
||||
d.readS32(13, &m_workspaceIndex);
|
||||
d.readBlob(14, &m_geometryBytes);
|
||||
|
||||
if (m_spectrumGUI)
|
||||
{
|
||||
|
@ -48,6 +48,8 @@ struct InterferometerSettings
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
uint16_t m_reverseAPIChannelIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
Serializable *m_channelMarker;
|
||||
Serializable *m_spectrumGUI;
|
||||
|
@ -66,7 +66,10 @@ BladeRF2MIMOGui::BladeRF2MIMOGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleRateMode(true)
|
||||
{
|
||||
qDebug("BladeRF2MIMOGui::BladeRF2MIMOGui");
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#BladeRF2MIMOGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplemimo/bladerf2mimo/readme.md";
|
||||
m_sampleMIMO = (BladeRF2MIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
|
||||
|
||||
m_sampleMIMO->getRxFrequencyRange(m_fMinRx, m_fMaxRx, m_fStepRx, m_fScaleRx);
|
||||
@ -100,6 +103,7 @@ BladeRF2MIMOGui::BladeRF2MIMOGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
BladeRF2MIMOGui::~BladeRF2MIMOGui()
|
||||
@ -821,3 +825,27 @@ int BladeRF2MIMOGui::getGainValue(float gainDB, int gainMin, int gainMax, int ga
|
||||
gainDB, gainMin, gainMax, gainStep, gainScale, gain);
|
||||
return gain;
|
||||
}
|
||||
|
||||
void BladeRF2MIMOGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->streamSide, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2MIMOGui::on_streamSide_currentIndexChanged);
|
||||
QObject::connect(ui->streamIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2MIMOGui::on_streamIndex_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumSide, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2MIMOGui::on_spectrumSide_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2MIMOGui::on_spectrumIndex_currentIndexChanged);
|
||||
QObject::connect(ui->startStopRx, &ButtonSwitch::toggled, this, &BladeRF2MIMOGui::on_startStopRx_toggled);
|
||||
QObject::connect(ui->startStopTx, &ButtonSwitch::toggled, this, &BladeRF2MIMOGui::on_startStopTx_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &BladeRF2MIMOGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &BladeRF2MIMOGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &BladeRF2MIMOGui::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &BladeRF2MIMOGui::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->bandwidth, &ValueDial::changed, this, &BladeRF2MIMOGui::on_bandwidth_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &BladeRF2MIMOGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2MIMOGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2MIMOGui::on_decim_currentIndexChanged);
|
||||
QObject::connect(ui->gainLock, &QToolButton::toggled, this, &BladeRF2MIMOGui::on_gainLock_toggled);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2MIMOGui::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &BladeRF2MIMOGui::on_gain_valueChanged);
|
||||
QObject::connect(ui->biasTee, &ButtonSwitch::toggled, this, &BladeRF2MIMOGui::on_biasTee_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &BladeRF2MIMOGui::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::BladeRF2MIMOGui* ui;
|
||||
@ -97,6 +101,7 @@ private:
|
||||
int getGainValue(float gainDB, int gainMin, int gainMax, int gainStep, float gainScale);
|
||||
float setGainFromValue(int value);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -58,6 +58,8 @@ void BladeRF2MIMOSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray BladeRF2MIMOSettings::serialize() const
|
||||
@ -97,6 +99,9 @@ QByteArray BladeRF2MIMOSettings::serialize() const
|
||||
s.writeU32(53, m_reverseAPIPort);
|
||||
s.writeU32(54, m_reverseAPIDeviceIndex);
|
||||
|
||||
s.writeS32(55, m_workspaceIndex);
|
||||
s.writeBlob(56, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
@ -158,6 +163,9 @@ bool BladeRF2MIMOSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(54, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
|
||||
d.readS32(55,&m_workspaceIndex, 0);
|
||||
d.readBlob(56, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -60,6 +60,8 @@ struct BladeRF2MIMOSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
BladeRF2MIMOSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -68,7 +68,10 @@ LimeSDRMIMOGUI::LimeSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleRateMode(true)
|
||||
{
|
||||
qDebug("LimeSDRMIMOGUI::LimeSDRMIMOGUI");
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#LimeSDRMIMOGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplemimo/limesdrmimo/readme.md";
|
||||
m_limeSDRMIMO = (LimeSDRMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
|
||||
|
||||
m_limeSDRMIMO->getRxFrequencyRange(m_fMinRx, m_fMaxRx, m_fStepRx);
|
||||
@ -100,6 +103,7 @@ LimeSDRMIMOGUI::LimeSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
LimeSDRMIMOGUI::~LimeSDRMIMOGUI()
|
||||
@ -1137,3 +1141,33 @@ void LimeSDRMIMOGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void LimeSDRMIMOGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->streamSide, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_streamSide_currentIndexChanged);
|
||||
QObject::connect(ui->streamIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_streamIndex_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumSide, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_spectrumSide_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_spectrumIndex_currentIndexChanged);
|
||||
QObject::connect(ui->startStopRx, &ButtonSwitch::toggled, this, &LimeSDRMIMOGUI::on_startStopRx_toggled);
|
||||
QObject::connect(ui->startStopTx, &ButtonSwitch::toggled, this, &LimeSDRMIMOGUI::on_startStopTx_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &LimeSDRMIMOGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ncoEnable, &ButtonSwitch::toggled, this, &LimeSDRMIMOGUI::on_ncoEnable_toggled);
|
||||
QObject::connect(ui->ncoFrequency, &ValueDialZ::changed, this, &LimeSDRMIMOGUI::on_ncoFrequency_changed);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &LimeSDRMIMOGUI::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &LimeSDRMIMOGUI::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->extClock, &ExternalClockButton::clicked, this, &LimeSDRMIMOGUI::on_extClock_clicked);
|
||||
QObject::connect(ui->hwDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_hwDecim_currentIndexChanged);
|
||||
QObject::connect(ui->swDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_swDecim_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &LimeSDRMIMOGUI::on_sampleRateMode_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &LimeSDRMIMOGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &LimeSDRMIMOGUI::on_lpf_changed);
|
||||
QObject::connect(ui->lpFIREnable, &ButtonSwitch::toggled, this, &LimeSDRMIMOGUI::on_lpFIREnable_toggled);
|
||||
QObject::connect(ui->lpFIR, &ValueDial::changed, this, &LimeSDRMIMOGUI::on_lpFIR_changed);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &LimeSDRMIMOGUI::on_transverter_clicked);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QDial::valueChanged, this, &LimeSDRMIMOGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->lnaGain, &QDial::valueChanged, this, &LimeSDRMIMOGUI::on_lnaGain_valueChanged);
|
||||
QObject::connect(ui->tiaGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_tiaGain_currentIndexChanged);
|
||||
QObject::connect(ui->pgaGain, &QDial::valueChanged, this, &LimeSDRMIMOGUI::on_pgaGain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDRMIMOGUI::on_antenna_currentIndexChanged);
|
||||
}
|
||||
|
@ -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::LimeSDRMIMOGUI* ui;
|
||||
@ -96,6 +100,7 @@ private:
|
||||
void updateSampleRateAndFrequency();
|
||||
void sendSettings();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -86,6 +86,8 @@ void LimeSDRMIMOSettings::resetToDefaults()
|
||||
m_lpfFIRBWTx1 = 2.5e6f;
|
||||
m_gainTx1 = 4;
|
||||
m_antennaPathTx1 = PATH_RFE_TX_NONE;
|
||||
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray LimeSDRMIMOSettings::serialize() const
|
||||
@ -153,6 +155,9 @@ QByteArray LimeSDRMIMOSettings::serialize() const
|
||||
s.writeU32(93, m_gainTx1);
|
||||
s.writeS32(94, (int) m_antennaPathTx1);
|
||||
|
||||
s.writeS32(95, m_workspaceIndex);
|
||||
s.writeBlob(96, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
@ -248,6 +253,9 @@ bool LimeSDRMIMOSettings::deserialize(const QByteArray& data)
|
||||
d.readS32(94, &intval, 0);
|
||||
m_antennaPathTx1 = (PathTxRFE) intval;
|
||||
|
||||
d.readS32(95, &m_workspaceIndex, 0);
|
||||
d.readBlob(96, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -255,4 +263,4 @@ bool LimeSDRMIMOSettings::deserialize(const QByteArray& data)
|
||||
resetToDefaults();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -119,10 +119,13 @@ struct LimeSDRMIMOSettings
|
||||
uint32_t m_gainTx1; //!< Tx[1] Optimally distributed gain (dB)
|
||||
PathTxRFE m_antennaPathTx1; //!< Tx[1] Antenna connection
|
||||
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
LimeSDRMIMOSettings();
|
||||
void resetToDefaults();
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
};
|
||||
|
||||
#endif // PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMOSETTINGS_H_
|
||||
#endif // PLUGINS_SAMPLEMIMO_LIMESDRMIMO_LIMESDRMIMOSETTINGS_H_
|
||||
|
@ -52,11 +52,14 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
qDebug("MetisMISOGui::MetisMISOGui");
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleMIMO = m_deviceUISet->m_deviceAPI->getSampleMIMO();
|
||||
m_rxSampleRate = 48000;
|
||||
m_txSampleRate = 48000;
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#MetisMISOGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplemimo/metismiso/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, 0, m_absMaxFreq);
|
||||
|
||||
@ -71,6 +74,8 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
|
||||
CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop);
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
MetisMISOGui::~MetisMISOGui()
|
||||
@ -574,3 +579,26 @@ void MetisMISOGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void MetisMISOGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->streamIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MetisMISOGui::on_streamIndex_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MetisMISOGui::on_spectrumSource_currentIndexChanged);
|
||||
QObject::connect(ui->streamLock, &QToolButton::toggled, this, &MetisMISOGui::on_streamLock_toggled);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &MetisMISOGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &MetisMISOGui::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &MetisMISOGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->samplerateIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MetisMISOGui::on_samplerateIndex_currentIndexChanged);
|
||||
QObject::connect(ui->log2Decim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MetisMISOGui::on_log2Decim_currentIndexChanged);
|
||||
QObject::connect(ui->subsamplingIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MetisMISOGui::on_subsamplingIndex_currentIndexChanged);
|
||||
QObject::connect(ui->dcBlock, &ButtonSwitch::toggled, this, &MetisMISOGui::on_dcBlock_toggled);
|
||||
QObject::connect(ui->iqCorrection, &ButtonSwitch::toggled, this, &MetisMISOGui::on_iqCorrection_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &MetisMISOGui::on_transverter_clicked);
|
||||
QObject::connect(ui->preamp, &ButtonSwitch::toggled, this, &MetisMISOGui::on_preamp_toggled);
|
||||
QObject::connect(ui->random, &ButtonSwitch::toggled, this, &MetisMISOGui::on_random_toggled);
|
||||
QObject::connect(ui->dither, &ButtonSwitch::toggled, this, &MetisMISOGui::on_dither_toggled);
|
||||
QObject::connect(ui->duplex, &ButtonSwitch::toggled, this, &MetisMISOGui::on_duplex_toggled);
|
||||
QObject::connect(ui->nbRxIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MetisMISOGui::on_nbRxIndex_currentIndexChanged);
|
||||
QObject::connect(ui->txEnable, &ButtonSwitch::toggled, this, &MetisMISOGui::on_txEnable_toggled);
|
||||
QObject::connect(ui->txDrive, &QDial::valueChanged, this, &MetisMISOGui::on_txDrive_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::MetisMISOGui* ui;
|
||||
@ -74,6 +78,7 @@ private:
|
||||
void sendSettings();
|
||||
void setCenterFrequency(qint64 centerFrequency);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -82,6 +82,7 @@ void MetisMISOSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray MetisMISOSettings::serialize() const
|
||||
@ -112,6 +113,8 @@ QByteArray MetisMISOSettings::serialize() const
|
||||
s.writeU32(22, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(23, m_streamIndex);
|
||||
s.writeS32(24, m_spectrumStreamIndex);
|
||||
s.writeS32(25, m_workspaceIndex);
|
||||
s.writeBlob(26, m_geometryBytes);
|
||||
|
||||
for (int i = 0; i < m_maxReceivers; i++)
|
||||
{
|
||||
@ -175,6 +178,8 @@ bool MetisMISOSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readS32(23, &m_streamIndex, 0);
|
||||
d.readS32(24, &m_spectrumStreamIndex, 0);
|
||||
d.readS32(25, &m_workspaceIndex, 0);
|
||||
d.readBlob(26, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -48,6 +48,8 @@ struct MetisMISOSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
MetisMISOSettings();
|
||||
MetisMISOSettings(const MetisMISOSettings& other);
|
||||
|
@ -68,7 +68,10 @@ PlutoSDRMIMOGUI::PlutoSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleRateMode(true)
|
||||
{
|
||||
qDebug("PlutoSDRMIMOGui::PlutoSDRMIMOGui");
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#PlutoSDRMIMOGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplemimo/plutosdrmimo/readme.md";
|
||||
m_sampleMIMO = (PlutoSDRMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
|
||||
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@ -102,6 +105,8 @@ PlutoSDRMIMOGUI::PlutoSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_sampleMIMO->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
PlutoSDRMIMOGUI::~PlutoSDRMIMOGUI()
|
||||
@ -891,3 +896,35 @@ void PlutoSDRMIMOGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void PlutoSDRMIMOGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->streamSide, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_streamSide_currentIndexChanged);
|
||||
QObject::connect(ui->streamIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_streamIndex_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumSide, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_spectrumSide_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_spectrumIndex_currentIndexChanged);
|
||||
QObject::connect(ui->startStopRx, &ButtonSwitch::toggled, this, &PlutoSDRMIMOGUI::on_startStopRx_toggled);
|
||||
QObject::connect(ui->startStopTx, &ButtonSwitch::toggled, this, &PlutoSDRMIMOGUI::on_startStopTx_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &PlutoSDRMIMOGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->loPPM, &QSlider::valueChanged, this, &PlutoSDRMIMOGUI::on_loPPM_valueChanged);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &PlutoSDRMIMOGUI::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &PlutoSDRMIMOGUI::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &PlutoSDRMIMOGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &PlutoSDRMIMOGUI::on_sampleRateMode_toggled);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged),this, &PlutoSDRMIMOGUI::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->swDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_swDecim_currentIndexChanged);
|
||||
QObject::connect(ui->gainLock, &QToolButton::toggled, this, &PlutoSDRMIMOGUI::on_gainLock_toggled);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QDial::valueChanged, this, &PlutoSDRMIMOGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->att, &QDial::valueChanged, this, &PlutoSDRMIMOGUI::on_att_valueChanged);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &PlutoSDRMIMOGUI::on_transverter_clicked);
|
||||
QObject::connect(ui->rfDCOffset, &ButtonSwitch::toggled, this, &PlutoSDRMIMOGUI::on_rfDCOffset_toggled);
|
||||
QObject::connect(ui->bbDCOffset, &ButtonSwitch::toggled, this, &PlutoSDRMIMOGUI::on_bbDCOffset_toggled);
|
||||
QObject::connect(ui->hwIQImbalance, &ButtonSwitch::toggled, this, &PlutoSDRMIMOGUI::on_hwIQImbalance_toggled);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &PlutoSDRMIMOGUI::on_lpf_changed);
|
||||
QObject::connect(ui->lpFIREnable, &ButtonSwitch::toggled, this, &PlutoSDRMIMOGUI::on_lpFIREnable_toggled);
|
||||
QObject::connect(ui->lpFIR, &ValueDial::changed, this, &PlutoSDRMIMOGUI::on_lpFIR_changed);
|
||||
QObject::connect(ui->lpFIRDecimation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_lpFIRDecimation_currentIndexChanged);
|
||||
QObject::connect(ui->lpFIRGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_lpFIRGain_currentIndexChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDRMIMOGUI::on_antenna_currentIndexChanged);
|
||||
}
|
||||
|
@ -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::PlutoSDRMIMOGUI* ui;
|
||||
@ -81,6 +85,7 @@ private:
|
||||
void setSampleRateLimits();
|
||||
void updateFrequencyLimits();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -77,6 +77,7 @@ void PlutoSDRMIMOSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray PlutoSDRMIMOSettings::serialize() const
|
||||
@ -141,6 +142,9 @@ QByteArray PlutoSDRMIMOSettings::serialize() const
|
||||
s.writeU32(102, m_reverseAPIPort);
|
||||
s.writeU32(103, m_reverseAPIDeviceIndex);
|
||||
|
||||
s.writeS32(104, m_workspaceIndex);
|
||||
s.writeBlob(105, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
@ -275,6 +279,9 @@ bool PlutoSDRMIMOSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(103, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
|
||||
d.readS32(104, &m_workspaceIndex, 0);
|
||||
d.readBlob(105, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -121,6 +121,8 @@ struct PlutoSDRMIMOSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
static const int m_plutoSDRBlockSizeSamples = 64*256; //complex samples per buffer (must be multiple of 64)
|
||||
|
||||
|
@ -52,6 +52,7 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
qDebug("TestMIGui::TestMIGui");
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleMIMO = m_deviceUISet->m_deviceAPI->getSampleMIMO();
|
||||
m_streamIndex = 0;
|
||||
m_deviceCenterFrequencies.push_back(m_settings.m_streams[0].m_centerFrequency);
|
||||
@ -59,7 +60,9 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_deviceSampleRates.push_back(m_settings.m_streams[0].m_sampleRate / (1<<m_settings.m_streams[0].m_log2Decim));
|
||||
m_deviceSampleRates.push_back(m_settings.m_streams[1].m_sampleRate / (1<<m_settings.m_streams[1].m_log2Decim));
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#TestMIGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplemimo/testmi/readme.md";
|
||||
ui->spectrumSource->addItem("0");
|
||||
ui->spectrumSource->addItem("1");
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@ -81,6 +84,8 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
|
||||
CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop);
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
TestMIGui::~TestMIGui()
|
||||
@ -559,3 +564,28 @@ void TestMIGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void TestMIGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &TestMIGui::on_startStop_toggled);
|
||||
QObject::connect(ui->streamIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMIGui::on_streamIndex_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMIGui::on_spectrumSource_currentIndexChanged);
|
||||
QObject::connect(ui->streamLock, &QToolButton::toggled, this, &TestMIGui::on_streamLock_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &TestMIGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->autoCorr, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMIGui::on_autoCorr_currentIndexChanged);
|
||||
QObject::connect(ui->frequencyShift, &ValueDialZ::changed, this, &TestMIGui::on_frequencyShift_changed);
|
||||
QObject::connect(ui->decimation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMIGui::on_decimation_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMIGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &TestMIGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->sampleSize, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMIGui::on_sampleSize_currentIndexChanged);
|
||||
QObject::connect(ui->amplitudeCoarse, &QSlider::valueChanged, this, &TestMIGui::on_amplitudeCoarse_valueChanged);
|
||||
QObject::connect(ui->amplitudeFine, &QSlider::valueChanged, this, &TestMIGui::on_amplitudeFine_valueChanged);
|
||||
QObject::connect(ui->modulation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMIGui::on_modulation_currentIndexChanged);
|
||||
QObject::connect(ui->modulationFrequency, &QDial::valueChanged, this, &TestMIGui::on_modulationFrequency_valueChanged);
|
||||
QObject::connect(ui->amModulation, &QDial::valueChanged, this, &TestMIGui::on_amModulation_valueChanged);
|
||||
QObject::connect(ui->fmDeviation, &QDial::valueChanged, this, &TestMIGui::on_fmDeviation_valueChanged);
|
||||
QObject::connect(ui->dcBias, &QSlider::valueChanged, this, &TestMIGui::on_dcBias_valueChanged);
|
||||
QObject::connect(ui->iBias, &QSlider::valueChanged, this, &TestMIGui::on_iBias_valueChanged);
|
||||
QObject::connect(ui->qBias, &QSlider::valueChanged, this, &TestMIGui::on_qBias_valueChanged);
|
||||
QObject::connect(ui->phaseImbalance, &QSlider::valueChanged, this, &TestMIGui::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::TestMIGui* ui;
|
||||
@ -73,6 +77,7 @@ private:
|
||||
void updateAmpFineLimit();
|
||||
void updateFrequencyShiftLimit();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>360</width>
|
||||
<height>300</height>
|
||||
<height>368</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -19,7 +19,7 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>360</width>
|
||||
<height>300</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -224,6 +224,9 @@
|
||||
<font>
|
||||
<family>Liberation Mono</family>
|
||||
<pointsize>20</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
@ -488,6 +491,9 @@
|
||||
<font>
|
||||
<family>Liberation Mono</family>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
@ -644,6 +650,9 @@
|
||||
<font>
|
||||
<family>Liberation Mono</family>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
@ -764,13 +773,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
@ -1052,9 +1054,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="fillerLayout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
@ -50,6 +50,7 @@ TestMISettings::TestMISettings()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
m_streams.push_back(TestMIStreamSettings());
|
||||
m_streams.push_back(TestMIStreamSettings());
|
||||
}
|
||||
@ -61,6 +62,7 @@ TestMISettings::TestMISettings(const TestMISettings& other) :
|
||||
m_reverseAPIAddress = other.m_reverseAPIAddress;
|
||||
m_reverseAPIPort = other.m_reverseAPIPort;
|
||||
m_reverseAPIDeviceIndex = other.m_reverseAPIDeviceIndex;
|
||||
m_workspaceIndex = other.m_workspaceIndex;
|
||||
}
|
||||
|
||||
void TestMISettings::resetToDefaults()
|
||||
@ -78,6 +80,8 @@ QByteArray TestMISettings::serialize() const
|
||||
s.writeString(2, m_reverseAPIAddress);
|
||||
s.writeU32(3, m_reverseAPIPort);
|
||||
s.writeU32(4, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(5, m_workspaceIndex);
|
||||
s.writeBlob(6, m_geometryBytes);
|
||||
|
||||
for (unsigned int i = 0; i < m_streams.size(); i++)
|
||||
{
|
||||
@ -128,6 +132,8 @@ bool TestMISettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(4, &utmp, 0);
|
||||
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readS32(5, &m_workspaceIndex, 0);
|
||||
d.readBlob(6, &m_geometryBytes);
|
||||
|
||||
for (unsigned int i = 0; i < m_streams.size(); i++)
|
||||
{
|
||||
|
@ -70,6 +70,8 @@ struct TestMISettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
std::vector<TestMIStreamSettings> m_streams;
|
||||
|
||||
TestMISettings();
|
||||
|
@ -49,7 +49,10 @@ TestMOSyncGui::TestMOSyncGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_tickCount(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#TestMOSyncGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplemimo/testmosync/readme.md";
|
||||
m_sampleMIMO = (TestMOSync*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
|
||||
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@ -70,6 +73,7 @@ TestMOSyncGui::TestMOSyncGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusTimer.start(500);
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
m_sampleMIMO->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
@ -77,6 +81,7 @@ TestMOSyncGui::TestMOSyncGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_deviceUISet->m_spectrum->setDisplayedStream(false, 0);
|
||||
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(false, 0);
|
||||
m_deviceUISet->setSpectrumScalingFactor(SDR_TX_SCALEF);
|
||||
|
||||
}
|
||||
|
||||
TestMOSyncGui::~TestMOSyncGui()
|
||||
@ -282,3 +287,12 @@ void TestMOSyncGui::on_spectrumIndex_currentIndexChanged(int index)
|
||||
void TestMOSyncGui::tick()
|
||||
{
|
||||
}
|
||||
|
||||
void TestMOSyncGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &TestMOSyncGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &TestMOSyncGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &TestMOSyncGui::on_startStop_toggled);
|
||||
QObject::connect(ui->interp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMOSyncGui::on_interp_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestMOSyncGui::on_spectrumIndex_currentIndexChanged);
|
||||
}
|
||||
|
@ -47,6 +47,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::TestMOSyncGui* ui;
|
||||
@ -72,6 +76,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -31,6 +31,7 @@ void TestMOSyncSettings::resetToDefaults()
|
||||
m_sampleRate = 48000;
|
||||
m_log2Interp = 0;
|
||||
m_fcPosTx = FC_POS_CENTER;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray TestMOSyncSettings::serialize() const
|
||||
@ -40,6 +41,8 @@ QByteArray TestMOSyncSettings::serialize() const
|
||||
s.writeU64(1, m_sampleRate);
|
||||
s.writeU32(2, m_log2Interp);
|
||||
s.writeS32(3, (int) m_fcPosTx);
|
||||
s.writeS32(4, m_workspaceIndex);
|
||||
s.writeBlob(5, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -60,8 +63,10 @@ bool TestMOSyncSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU64(1, &m_sampleRate, 48000);
|
||||
d.readU32(2, &m_log2Interp, 0);
|
||||
d.readS32(38, &intval, 2);
|
||||
d.readS32(3, &intval, 2);
|
||||
m_fcPosTx = (fcPos_t) intval;
|
||||
d.readS32(4, &m_workspaceIndex, 0);
|
||||
d.readBlob(5, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -31,6 +31,8 @@ struct TestMOSyncSettings {
|
||||
quint64 m_sampleRate;
|
||||
quint32 m_log2Interp;
|
||||
fcPos_t m_fcPosTx;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
static const unsigned int m_msThrottle;
|
||||
|
||||
|
@ -65,7 +65,10 @@ XTRXMIMOGUI::XTRXMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleRateMode(true)
|
||||
{
|
||||
qDebug("XTRXMIMOGUI::XTRXMIMOGUI");
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#XTRXMIMOGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplemimo/xtrxmimo/readme.md";
|
||||
m_xtrxMIMO = (XTRXMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
|
||||
|
||||
float minF, maxF, stepF;
|
||||
@ -97,6 +100,7 @@ XTRXMIMOGUI::XTRXMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
XTRXMIMOGUI::~XTRXMIMOGUI()
|
||||
@ -1013,3 +1017,31 @@ void XTRXMIMOGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void XTRXMIMOGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->streamSide, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_streamSide_currentIndexChanged);
|
||||
QObject::connect(ui->streamIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_streamIndex_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumSide, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_spectrumSide_currentIndexChanged);
|
||||
QObject::connect(ui->spectrumIndex, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_spectrumIndex_currentIndexChanged);
|
||||
QObject::connect(ui->startStopRx, &ButtonSwitch::toggled, this, &XTRXMIMOGUI::on_startStopRx_toggled);
|
||||
QObject::connect(ui->startStopTx, &ButtonSwitch::toggled, this, &XTRXMIMOGUI::on_startStopTx_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &XTRXMIMOGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ncoEnable, &ButtonSwitch::toggled, this, &XTRXMIMOGUI::on_ncoEnable_toggled);
|
||||
QObject::connect(ui->ncoFrequency, &ValueDialZ::changed, this, &XTRXMIMOGUI::on_ncoFrequency_changed);
|
||||
QObject::connect(ui->dcOffset, &ButtonSwitch::toggled, this, &XTRXMIMOGUI::on_dcOffset_toggled);
|
||||
QObject::connect(ui->iqImbalance, &ButtonSwitch::toggled, this, &XTRXMIMOGUI::on_iqImbalance_toggled);
|
||||
QObject::connect(ui->extClock, &ExternalClockButton::clicked, this, &XTRXMIMOGUI::on_extClock_clicked);
|
||||
QObject::connect(ui->hwDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_hwDecim_currentIndexChanged);
|
||||
QObject::connect(ui->swDecim, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_swDecim_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &XTRXMIMOGUI::on_sampleRateMode_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &XTRXMIMOGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &XTRXMIMOGUI::on_lpf_changed);
|
||||
QObject::connect(ui->pwrmode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_pwrmode_currentIndexChanged);
|
||||
QObject::connect(ui->gainMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_gainMode_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QDial::valueChanged, this, &XTRXMIMOGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->lnaGain, &QDial::valueChanged, this, &XTRXMIMOGUI::on_lnaGain_valueChanged);
|
||||
QObject::connect(ui->tiaGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_tiaGain_currentIndexChanged);
|
||||
QObject::connect(ui->pgaGain, &QDial::valueChanged, this, &XTRXMIMOGUI::on_pgaGain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXMIMOGUI::on_antenna_currentIndexChanged);
|
||||
}
|
||||
|
@ -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::XTRXMIMOGUI* ui;
|
||||
@ -85,6 +89,7 @@ private:
|
||||
void updateADCRate();
|
||||
void updateDACRate();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -75,6 +75,8 @@ void XTRXMIMOSettings::resetToDefaults()
|
||||
m_lpfBWTx1 = 4.5e6f;
|
||||
m_gainTx1 = 20;
|
||||
m_pwrmodeTx1 = 4;
|
||||
// GUI
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray XTRXMIMOSettings::serialize() const
|
||||
@ -129,6 +131,9 @@ QByteArray XTRXMIMOSettings::serialize() const
|
||||
s.writeFloat(90, m_lpfBWTx1);
|
||||
s.writeU32(91, m_gainTx1);
|
||||
s.writeU32(92, m_pwrmodeTx1);
|
||||
// GUI
|
||||
s.writeS32(93, m_workspaceIndex);
|
||||
s.writeBlob(94, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
@ -93,6 +93,9 @@ struct XTRXMIMOSettings
|
||||
float m_lpfBWTx1; //!< LMS analog lowpass filter bandwidth (Hz)
|
||||
uint32_t m_gainTx1; //!< Optimally distributed gain (dB)
|
||||
uint32_t m_pwrmodeTx1;
|
||||
// GUI
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
XTRXMIMOSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -40,9 +40,12 @@ AudioOutputGui::AudioOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_settings(),
|
||||
m_centerFrequency(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_audioOutput = (AudioOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#AudioOutputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/audiooutput/readme.md";
|
||||
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
|
||||
@ -57,6 +60,8 @@ AudioOutputGui::AudioOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_audioOutput->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
AudioOutputGui::~AudioOutputGui()
|
||||
@ -237,3 +242,11 @@ void AudioOutputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void AudioOutputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->deviceSelect, &QPushButton::clicked, this, &AudioOutputGui::on_deviceSelect_clicked);
|
||||
QObject::connect(ui->volume, &QDial::valueChanged, this, &AudioOutputGui::on_volume_valueChanged);
|
||||
QObject::connect(ui->channels, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &AudioOutputGui::on_channels_currentIndexChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &AudioOutputGui::on_startStop_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::AudioOutputGui* ui;
|
||||
@ -65,6 +69,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -34,6 +34,7 @@ void AudioOutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray AudioOutputSettings::serialize() const
|
||||
@ -43,6 +44,8 @@ QByteArray AudioOutputSettings::serialize() const
|
||||
s.writeString(1, m_deviceName);
|
||||
s.writeFloat(3, m_volume);
|
||||
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);
|
||||
@ -69,6 +72,8 @@ bool AudioOutputSettings::deserialize(const QByteArray& data)
|
||||
d.readString(1, &m_deviceName, "");
|
||||
d.readFloat(3, &m_volume, 1.0f);
|
||||
d.readS32(5, (int *)&m_iqMapping, IQMapping::LR);
|
||||
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");
|
||||
|
@ -34,6 +34,8 @@ struct AudioOutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
AudioOutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -43,10 +43,12 @@ Bladerf1OutputGui::Bladerf1OutputGui(DeviceUISet *deviceUISet, QWidget* parent)
|
||||
m_sampleRate(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_deviceSampleSink = (Bladerf1Output*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#Bladerf1OutputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "/plugins/samplesink/bladerf1output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN_XB200/1000, BLADERF_FREQUENCY_MAX/1000);
|
||||
|
||||
ui->sampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow));
|
||||
@ -67,6 +69,7 @@ Bladerf1OutputGui::Bladerf1OutputGui(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);
|
||||
}
|
||||
@ -460,3 +463,13 @@ void Bladerf1OutputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void Bladerf1OutputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &Bladerf1OutputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &Bladerf1OutputGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->bandwidth, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &Bladerf1OutputGui::on_bandwidth_currentIndexChanged);
|
||||
QObject::connect(ui->interp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &Bladerf1OutputGui::on_interp_currentIndexChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &Bladerf1OutputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &Bladerf1OutputGui::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::Bladerf1OutputGui* ui;
|
||||
@ -69,6 +73,7 @@ private:
|
||||
unsigned int getXb200Index(bool xb_200, bladerf_xb200_path xb200Path, bladerf_xb200_filter xb200Filter);
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -41,6 +41,7 @@ void BladeRF1OutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray BladeRF1OutputSettings::serialize() const
|
||||
@ -59,6 +60,8 @@ QByteArray BladeRF1OutputSettings::serialize() const
|
||||
s.writeString(10, m_reverseAPIAddress);
|
||||
s.writeU32(11, m_reverseAPIPort);
|
||||
s.writeU32(12, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(13, m_workspaceIndex);
|
||||
s.writeBlob(14, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -100,6 +103,8 @@ bool BladeRF1OutputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(12, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(13, &m_workspaceIndex, 0);
|
||||
d.readBlob(14, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ struct BladeRF1OutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
BladeRF1OutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -43,12 +43,15 @@ BladeRF2OutputGui::BladeRF2OutputGui(DeviceUISet *deviceUISet, QWidget* parent)
|
||||
m_sampleRate(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSink = (BladeRF2Output*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
int max, min, step;
|
||||
float scale;
|
||||
uint64_t f_min, f_max;
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#BladeRF2OutputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/bladerf2output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
|
||||
m_sampleSink->getFrequencyRange(f_min, f_max, step, scale);
|
||||
qDebug("BladeRF2OutputGui::BladeRF2OutputGui: getFrequencyRange: [%lu,%lu] step: %d", f_min, f_max, step);
|
||||
@ -80,6 +83,7 @@ BladeRF2OutputGui::BladeRF2OutputGui(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_sampleSink->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@ -453,3 +457,17 @@ int BladeRF2OutputGui::getGainValue(float gainDB)
|
||||
// gainDB, m_gainMin, m_gainMax, m_gainStep, gain);
|
||||
return gain;
|
||||
}
|
||||
|
||||
void BladeRF2OutputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &BladeRF2OutputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &BladeRF2OutputGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->biasTee, &ButtonSwitch::toggled, this, &BladeRF2OutputGui::on_biasTee_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &BladeRF2OutputGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->bandwidth, &ValueDial::changed, this, &BladeRF2OutputGui::on_bandwidth_changed);
|
||||
QObject::connect(ui->interp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BladeRF2OutputGui::on_interp_currentIndexChanged);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &BladeRF2OutputGui::on_gain_valueChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &BladeRF2OutputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &BladeRF2OutputGui::on_transverter_clicked);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &BladeRF2OutputGui::on_sampleRateMode_toggled);
|
||||
}
|
||||
|
@ -46,6 +46,10 @@ public:
|
||||
virtual 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::BladeRF2OutputGui* ui;
|
||||
@ -76,6 +80,7 @@ private:
|
||||
void setCenterFrequencySetting(uint64_t kHzValue);
|
||||
float getGainDB(int gainValue);
|
||||
int getGainValue(float gainDB);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -41,6 +41,7 @@ void BladeRF2OutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray BladeRF2OutputSettings::serialize() const
|
||||
@ -59,6 +60,8 @@ QByteArray BladeRF2OutputSettings::serialize() const
|
||||
s.writeString(10, m_reverseAPIAddress);
|
||||
s.writeU32(11, m_reverseAPIPort);
|
||||
s.writeU32(12, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(13, m_workspaceIndex);
|
||||
s.writeBlob(14, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -97,6 +100,8 @@ bool BladeRF2OutputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(12, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(13, &m_workspaceIndex, 0);
|
||||
d.readBlob(14, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -35,6 +35,8 @@ struct BladeRF2OutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
BladeRF2OutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -51,7 +51,11 @@ FileOutputGui::FileOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_tickCount(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#FileOutputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/fileoutput/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, 0, pow(10,7));
|
||||
@ -67,6 +71,7 @@ FileOutputGui::FileOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusTimer.start(500);
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
m_deviceSampleSink = (FileOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
@ -316,3 +321,12 @@ void FileOutputGui::tick()
|
||||
m_deviceSampleSink->getInputMessageQueue()->push(message);
|
||||
}
|
||||
}
|
||||
|
||||
void FileOutputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &FileOutputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &FileOutputGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &FileOutputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->showFileDialog, &QPushButton::clicked, this, &FileOutputGui::on_showFileDialog_clicked);
|
||||
QObject::connect(ui->interp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FileOutputGui::on_interp_currentIndexChanged);
|
||||
}
|
||||
|
@ -47,6 +47,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::FileOutputGui* ui;
|
||||
@ -76,6 +80,7 @@ private:
|
||||
void updateWithStreamTime();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>350</width>
|
||||
<height>190</height>
|
||||
<width>360</width>
|
||||
<height>144</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -18,8 +18,8 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>190</height>
|
||||
<width>360</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -364,23 +364,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>
|
||||
|
@ -33,6 +33,7 @@ void FileOutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray FileOutputSettings::serialize() const
|
||||
@ -46,6 +47,8 @@ QByteArray FileOutputSettings::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();
|
||||
}
|
||||
@ -79,6 +82,8 @@ bool FileOutputSettings::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 FileOutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
FileOutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -45,9 +45,12 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_lastEngineState(DeviceAPI::StNotStarted),
|
||||
m_doApplySettings(true)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#HackRFOutputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/hackrfoutput/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->centerFrequency->setValueRange(7, 0U, 7250000U);
|
||||
|
||||
@ -64,6 +67,7 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
displaySettings();
|
||||
displayBandwidths();
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
@ -454,3 +458,19 @@ void HackRFOutputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void HackRFOutputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &HackRFOutputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &HackRFOutputGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &HackRFOutputGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->biasT, &QCheckBox::stateChanged, this, &HackRFOutputGui::on_biasT_stateChanged);
|
||||
QObject::connect(ui->interp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &HackRFOutputGui::on_interp_currentIndexChanged);
|
||||
QObject::connect(ui->fcPos, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &HackRFOutputGui::on_fcPos_currentIndexChanged);
|
||||
QObject::connect(ui->lnaExt, &QCheckBox::stateChanged, this, &HackRFOutputGui::on_lnaExt_stateChanged);
|
||||
QObject::connect(ui->bbFilter, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &HackRFOutputGui::on_bbFilter_currentIndexChanged);
|
||||
QObject::connect(ui->txvga, &QSlider::valueChanged, this, &HackRFOutputGui::on_txvga_valueChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &HackRFOutputGui::on_startStop_toggled);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &HackRFOutputGui::on_sampleRateMode_toggled);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &HackRFOutputGui::on_transverter_clicked);
|
||||
}
|
||||
|
@ -55,6 +55,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::HackRFOutputGui* ui;
|
||||
@ -81,6 +85,7 @@ private:
|
||||
void updateFrequencyLimits();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -43,6 +43,7 @@ void HackRFOutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray HackRFOutputSettings::serialize() const
|
||||
@ -63,6 +64,8 @@ QByteArray HackRFOutputSettings::serialize() const
|
||||
s.writeU32(12, m_reverseAPIDeviceIndex);
|
||||
s.writeBool(13, m_transverterMode);
|
||||
s.writeS64(14, m_transverterDeltaFrequency);
|
||||
s.writeS32(15, m_workspaceIndex);
|
||||
s.writeBlob(16, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -105,6 +108,8 @@ bool HackRFOutputSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readBool(13, &m_transverterMode, false);
|
||||
d.readS64(14, &m_transverterDeltaFrequency, 0);
|
||||
d.readS32(15, &m_workspaceIndex, 0);
|
||||
d.readBlob(16, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -43,6 +43,8 @@ struct HackRFOutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
HackRFOutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -42,9 +42,12 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusCounter(0),
|
||||
m_deviceStatusCounter(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_limeSDROutput = (LimeSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#LimeSDROutputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/limesdroutput/readme.md";
|
||||
|
||||
float minF, maxF;
|
||||
|
||||
@ -94,6 +97,7 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
LimeSDROutputGUI::~LimeSDROutputGUI()
|
||||
@ -630,3 +634,22 @@ void LimeSDROutputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void LimeSDROutputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &LimeSDROutputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &LimeSDROutputGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ncoFrequency, &ValueDialZ::changed, this, &LimeSDROutputGUI::on_ncoFrequency_changed);
|
||||
QObject::connect(ui->ncoEnable, &ButtonSwitch::toggled, this, &LimeSDROutputGUI::on_ncoEnable_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &LimeSDROutputGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->hwInterp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDROutputGUI::on_hwInterp_currentIndexChanged);
|
||||
QObject::connect(ui->swInterp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDROutputGUI::on_swInterp_currentIndexChanged);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &LimeSDROutputGUI::on_lpf_changed);
|
||||
QObject::connect(ui->lpFIREnable, &ButtonSwitch::toggled, this, &LimeSDROutputGUI::on_lpFIREnable_toggled);
|
||||
QObject::connect(ui->lpFIR, &ValueDial::changed, this, &LimeSDROutputGUI::on_lpFIR_changed);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &LimeSDROutputGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &LimeSDROutputGUI::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->extClock, &ExternalClockButton::clicked, this, &LimeSDROutputGUI::on_extClock_clicked);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &LimeSDROutputGUI::on_transverter_clicked);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &LimeSDROutputGUI::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::LimeSDROutputGUI* ui;
|
||||
@ -75,6 +79,7 @@ private:
|
||||
void updateFrequencyLimits();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -47,6 +47,7 @@ void LimeSDROutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray LimeSDROutputSettings::serialize() const
|
||||
@ -73,6 +74,8 @@ QByteArray LimeSDROutputSettings::serialize() const
|
||||
s.writeString(21, m_reverseAPIAddress);
|
||||
s.writeU32(22, m_reverseAPIPort);
|
||||
s.writeU32(23, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(24, m_workspaceIndex);
|
||||
s.writeBlob(25, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -123,6 +126,8 @@ bool LimeSDROutputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(23, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(24, &m_workspaceIndex, 0);
|
||||
d.readBlob(25, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -65,6 +65,8 @@ struct LimeSDROutputSettings
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
LimeSDROutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -58,10 +58,13 @@ LocalOutputGui::LocalOutputGui(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);
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#LocalOutputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/localoutput/readme.md";
|
||||
|
||||
CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop);
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
@ -79,6 +82,7 @@ LocalOutputGui::LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
|
||||
m_forceSettings = true;
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
LocalOutputGui::~LocalOutputGui()
|
||||
@ -293,3 +297,8 @@ void LocalOutputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void LocalOutputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &LocalOutputGui::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::LocalOutputGui* ui;
|
||||
@ -75,6 +79,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -29,6 +29,7 @@ void LocalOutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray LocalOutputSettings::serialize() const
|
||||
@ -38,6 +39,8 @@ QByteArray LocalOutputSettings::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();
|
||||
}
|
||||
@ -67,6 +70,9 @@ bool LocalOutputSettings::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
|
||||
|
@ -26,6 +26,8 @@ struct LocalOutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
LocalOutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -45,9 +45,12 @@ PlutoSDROutputGUI::PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent)
|
||||
m_doApplySettings(true),
|
||||
m_statusCounter(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSink = (PlutoSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#PlutoSDROutputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/plutosdroutput/readme.md";
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
updateFrequencyLimits();
|
||||
|
||||
@ -71,6 +74,7 @@ PlutoSDROutputGUI::PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent)
|
||||
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
blockApplySettings(false);
|
||||
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
@ -493,3 +497,21 @@ void PlutoSDROutputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void PlutoSDROutputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &PlutoSDROutputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &PlutoSDROutputGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->loPPM, &QSlider::valueChanged, this, &PlutoSDROutputGUI::on_loPPM_valueChanged);
|
||||
QObject::connect(ui->swInterp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDROutputGUI::on_swInterp_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &PlutoSDROutputGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &PlutoSDROutputGUI::on_lpf_changed);
|
||||
QObject::connect(ui->lpFIREnable, &ButtonSwitch::toggled, this, &PlutoSDROutputGUI::on_lpFIREnable_toggled);
|
||||
QObject::connect(ui->lpFIR, &ValueDial::changed, this, &PlutoSDROutputGUI::on_lpFIR_changed);
|
||||
QObject::connect(ui->lpFIRInterpolation, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDROutputGUI::on_lpFIRInterpolation_currentIndexChanged);
|
||||
QObject::connect(ui->lpFIRGain, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDROutputGUI::on_lpFIRGain_currentIndexChanged);
|
||||
QObject::connect(ui->att, &QDial::valueChanged, this, &PlutoSDROutputGUI::on_att_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PlutoSDROutputGUI::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &PlutoSDROutputGUI::on_transverter_clicked);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &PlutoSDROutputGUI::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::PlutoSDROutputGUI* ui;
|
||||
@ -73,6 +77,7 @@ private:
|
||||
void setSampleRateLimits();
|
||||
void updateFrequencyLimits();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void on_startStop_toggled(bool checked);
|
||||
|
@ -44,6 +44,7 @@ void PlutoSDROutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray PlutoSDROutputSettings::serialize() const
|
||||
@ -66,6 +67,8 @@ QByteArray PlutoSDROutputSettings::serialize() const
|
||||
s.writeString(18, m_reverseAPIAddress);
|
||||
s.writeU32(19, m_reverseAPIPort);
|
||||
s.writeU32(20, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(21, m_workspaceIndex);
|
||||
s.writeBlob(22, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -119,6 +122,8 @@ bool PlutoSDROutputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(20, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(21, &m_workspaceIndex, 0);
|
||||
d.readBlob(22, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -51,6 +51,8 @@ struct PlutoSDROutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
PlutoSDROutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -56,6 +56,7 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* pare
|
||||
m_forceSettings(true),
|
||||
m_remoteAPIConnected(false)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_countUnrecoverable = 0;
|
||||
m_countRecovered = 0;
|
||||
m_lastCountUnrecoverable = 0;
|
||||
@ -66,7 +67,9 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* pare
|
||||
m_paletteRedText.setColor(QPalette::WindowText, Qt::red);
|
||||
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#RemoteOutputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/remoteoutput/readme.md";
|
||||
|
||||
connect(&(m_deviceUISet->m_deviceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
@ -88,6 +91,7 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* pare
|
||||
|
||||
displaySettings();
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
RemoteOutputSinkGui::~RemoteOutputSinkGui()
|
||||
@ -540,3 +544,19 @@ void RemoteOutputSinkGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void RemoteOutputSinkGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->nbFECBlocks, &QDial::valueChanged, this, &RemoteOutputSinkGui::on_nbFECBlocks_valueChanged);
|
||||
QObject::connect(ui->deviceIndex, &QLineEdit::returnPressed, this, &RemoteOutputSinkGui::on_deviceIndex_returnPressed);
|
||||
QObject::connect(ui->channelIndex, &QLineEdit::returnPressed, this, &RemoteOutputSinkGui::on_channelIndex_returnPressed);
|
||||
QObject::connect(ui->nbTxBytes, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &RemoteOutputSinkGui::on_nbTxBytes_currentIndexChanged);
|
||||
QObject::connect(ui->apiAddress, &QLineEdit::returnPressed, this, &RemoteOutputSinkGui::on_apiAddress_returnPressed);
|
||||
QObject::connect(ui->apiPort, &QLineEdit::returnPressed, this, &RemoteOutputSinkGui::on_apiPort_returnPressed);
|
||||
QObject::connect(ui->dataAddress, &QLineEdit::returnPressed, this, &RemoteOutputSinkGui::on_dataAddress_returnPressed);
|
||||
QObject::connect(ui->dataPort, &QLineEdit::returnPressed, this, &RemoteOutputSinkGui::on_dataPort_returnPressed);
|
||||
QObject::connect(ui->apiApplyButton, &QPushButton::clicked, this, &RemoteOutputSinkGui::on_apiApplyButton_clicked);
|
||||
QObject::connect(ui->dataApplyButton, &QPushButton::clicked, this, &RemoteOutputSinkGui::on_dataApplyButton_clicked);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &RemoteOutputSinkGui::on_startStop_toggled);
|
||||
QObject::connect(ui->eventCountsReset, &QPushButton::clicked, this, &RemoteOutputSinkGui::on_eventCountsReset_clicked);
|
||||
}
|
||||
|
@ -77,6 +77,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::RemoteOutputGui* ui;
|
||||
@ -123,6 +127,7 @@ private:
|
||||
void displayEventStatus(int recoverableCount, int unrecoverableCount);
|
||||
void displayEventTimer();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -37,6 +37,7 @@ void RemoteOutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray RemoteOutputSettings::serialize() const
|
||||
@ -55,6 +56,8 @@ QByteArray RemoteOutputSettings::serialize() const
|
||||
s.writeString(13, m_reverseAPIAddress);
|
||||
s.writeU32(14, m_reverseAPIPort);
|
||||
s.writeU32(15, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(16, m_workspaceIndex);
|
||||
s.writeBlob(17, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -95,6 +98,8 @@ bool RemoteOutputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(15, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(16, &m_workspaceIndex, 0);
|
||||
d.readBlob(17, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -34,6 +34,8 @@ struct RemoteOutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
RemoteOutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -57,8 +57,11 @@ SoapySDROutputGui::SoapySDROutputGui(DeviceUISet *deviceUISet, QWidget* parent)
|
||||
m_autoDCCorrection(0),
|
||||
m_autoIQCorrection(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_sampleSink = (SoapySDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#SoapySDROutputGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/soapysdroutput/readme.md";
|
||||
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
uint64_t f_min, f_max;
|
||||
@ -99,6 +102,7 @@ SoapySDROutputGui::SoapySDROutputGui(DeviceUISet *deviceUISet, QWidget* parent)
|
||||
m_sampleSink->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
SoapySDROutputGui::~SoapySDROutputGui()
|
||||
@ -883,3 +887,12 @@ void SoapySDROutputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SoapySDROutputGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &SoapySDROutputGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->LOppm, &QSlider::valueChanged, this, &SoapySDROutputGui::on_LOppm_valueChanged);
|
||||
QObject::connect(ui->interp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SoapySDROutputGui::on_interp_currentIndexChanged);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &SoapySDROutputGui::on_transverter_clicked);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &SoapySDROutputGui::on_startStop_toggled);
|
||||
}
|
||||
|
@ -53,6 +53,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(
|
||||
@ -107,6 +111,7 @@ private:
|
||||
void updateSampleRateAndFrequency();
|
||||
void updateFrequencyLimits();
|
||||
void setCenterFrequencySetting(uint64_t kHzValue);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -47,6 +47,7 @@ void SoapySDROutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray SoapySDROutputSettings::serialize() const
|
||||
@ -76,6 +77,8 @@ QByteArray SoapySDROutputSettings::serialize() const
|
||||
s.writeString(24, m_reverseAPIAddress);
|
||||
s.writeU32(25, m_reverseAPIPort);
|
||||
s.writeU32(26, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(27, m_workspaceIndex);
|
||||
s.writeBlob(28, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -133,6 +136,8 @@ bool SoapySDROutputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(26, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(27, &m_workspaceIndex, 0);
|
||||
d.readBlob(28, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -45,6 +45,8 @@ struct SoapySDROutputSettings {
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
SoapySDROutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -48,7 +48,10 @@ TestSinkGui::TestSinkGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_tickCount(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#TestSinkGui { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/testsink/readme.md";
|
||||
m_sampleSink = (TestSinkOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
@ -69,6 +72,7 @@ TestSinkGui::TestSinkGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusTimer.start(500);
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
@ -257,3 +261,11 @@ void TestSinkGui::on_startStop_toggled(bool checked)
|
||||
void TestSinkGui::tick()
|
||||
{
|
||||
}
|
||||
|
||||
void TestSinkGui::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &TestSinkGui::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &TestSinkGui::on_sampleRate_changed);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &TestSinkGui::on_startStop_toggled);
|
||||
QObject::connect(ui->interp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TestSinkGui::on_interp_currentIndexChanged);
|
||||
}
|
||||
|
@ -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::TestSinkGui* ui;
|
||||
@ -73,6 +77,7 @@ private:
|
||||
void sendSettings();
|
||||
void updateSampleRateAndFrequency();
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -30,6 +30,7 @@ void TestSinkSettings::resetToDefaults()
|
||||
m_sampleRate = 48000;
|
||||
m_log2Interp = 0;
|
||||
m_spectrumGUI = nullptr;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray TestSinkSettings::serialize() const
|
||||
@ -44,6 +45,9 @@ QByteArray TestSinkSettings::serialize() const
|
||||
s.writeBlob(4, m_spectrumGUI->serialize());
|
||||
}
|
||||
|
||||
s.writeS32(5, m_workspaceIndex);
|
||||
s.writeBlob(6, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
|
||||
@ -71,6 +75,9 @@ bool TestSinkSettings::deserialize(const QByteArray& data)
|
||||
m_spectrumGUI->deserialize(bytetmp);
|
||||
}
|
||||
|
||||
d.readS32(5, &m_workspaceIndex, 0);
|
||||
d.readBlob(6, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -27,6 +27,8 @@ struct TestSinkSettings {
|
||||
quint64 m_sampleRate;
|
||||
quint32 m_log2Interp;
|
||||
Serializable *m_spectrumGUI;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
TestSinkSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -43,9 +43,12 @@ USRPOutputGUI::USRPOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusCounter(0),
|
||||
m_deviceStatusCounter(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_usrpOutput = (USRPOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#USRPOutputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/usrpoutput/readme.md";
|
||||
|
||||
float minF, maxF;
|
||||
|
||||
@ -87,6 +90,7 @@ USRPOutputGUI::USRPOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
|
||||
|
||||
sendSettings();
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
USRPOutputGUI::~USRPOutputGUI()
|
||||
@ -574,3 +578,18 @@ void USRPOutputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void USRPOutputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &USRPOutputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &USRPOutputGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &USRPOutputGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->swInterp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USRPOutputGUI::on_swInterp_currentIndexChanged);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &USRPOutputGUI::on_lpf_changed);
|
||||
QObject::connect(ui->loOffset, &ValueDialZ::changed, this, &USRPOutputGUI::on_loOffset_changed);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &USRPOutputGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USRPOutputGUI::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->clockSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USRPOutputGUI::on_clockSource_currentIndexChanged);
|
||||
QObject::connect(ui->transverter, &TransverterButton::clicked, this, &USRPOutputGUI::on_transverter_clicked);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &USRPOutputGUI::on_sampleRateMode_toggled);
|
||||
}
|
||||
|
@ -52,6 +52,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::USRPOutputGUI* ui;
|
||||
@ -80,6 +84,7 @@ private:
|
||||
void updateSampleRate();
|
||||
void updateFrequencyLimits();
|
||||
void blockApplySettings(bool block);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -42,6 +42,7 @@ void USRPOutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray USRPOutputSettings::serialize() const
|
||||
@ -61,6 +62,8 @@ QByteArray USRPOutputSettings::serialize() const
|
||||
s.writeU32(11, m_reverseAPIPort);
|
||||
s.writeU32(12, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(13, m_loOffset);
|
||||
s.writeS32(14, m_workspaceIndex);
|
||||
s.writeBlob(15, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -100,6 +103,8 @@ bool USRPOutputSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(12, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(13, &m_loOffset, 0);
|
||||
d.readS32(14, &m_workspaceIndex, 0);
|
||||
d.readBlob(15, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -47,6 +47,8 @@ struct USRPOutputSettings
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
USRPOutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -44,9 +44,12 @@ XTRXOutputGUI::XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_statusCounter(0),
|
||||
m_deviceStatusCounter(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_XTRXOutput = (XTRXOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getContents());
|
||||
getContents()->setStyleSheet("#XTRXOutputGUI { border: 1px solid #C06900 }");
|
||||
m_helpURL = "plugins/samplesink/xtrxoutput/readme.md";
|
||||
|
||||
float minF, maxF, stepF;
|
||||
|
||||
@ -74,6 +77,7 @@ XTRXOutputGUI::XTRXOutputGUI(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);
|
||||
}
|
||||
@ -565,3 +569,20 @@ void XTRXOutputGUI::openDeviceSettingsDialog(const QPoint& p)
|
||||
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void XTRXOutputGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &XTRXOutputGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &XTRXOutputGUI::on_centerFrequency_changed);
|
||||
QObject::connect(ui->ncoFrequency, &ValueDialZ::changed, this, &XTRXOutputGUI::on_ncoFrequency_changed);
|
||||
QObject::connect(ui->ncoEnable, &ButtonSwitch::toggled, this, &XTRXOutputGUI::on_ncoEnable_toggled);
|
||||
QObject::connect(ui->sampleRate, &ValueDial::changed, this, &XTRXOutputGUI::on_sampleRate_changed);
|
||||
QObject::connect(ui->hwInterp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXOutputGUI::on_hwInterp_currentIndexChanged);
|
||||
QObject::connect(ui->swInterp, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXOutputGUI::on_swInterp_currentIndexChanged);
|
||||
QObject::connect(ui->lpf, &ValueDial::changed, this, &XTRXOutputGUI::on_lpf_changed);
|
||||
QObject::connect(ui->gain, &QSlider::valueChanged, this, &XTRXOutputGUI::on_gain_valueChanged);
|
||||
QObject::connect(ui->antenna, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXOutputGUI::on_antenna_currentIndexChanged);
|
||||
QObject::connect(ui->extClock, &ExternalClockButton::clicked, this, &XTRXOutputGUI::on_extClock_clicked);
|
||||
QObject::connect(ui->pwrmode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XTRXOutputGUI::on_pwrmode_currentIndexChanged);
|
||||
QObject::connect(ui->sampleRateMode, &QToolButton::toggled, this, &XTRXOutputGUI::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::XTRXOutputGUI* ui;
|
||||
@ -73,6 +77,7 @@ private:
|
||||
void updateDACRate();
|
||||
void blockApplySettings(bool block);
|
||||
bool handleMessage(const Message& message);
|
||||
void makeUIConnections();
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -42,6 +42,7 @@ void XTRXOutputSettings::resetToDefaults()
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
m_workspaceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray XTRXOutputSettings::serialize() const
|
||||
@ -63,6 +64,8 @@ QByteArray XTRXOutputSettings::serialize() const
|
||||
s.writeString(13, m_reverseAPIAddress);
|
||||
s.writeU32(14, m_reverseAPIPort);
|
||||
s.writeU32(15, m_reverseAPIDeviceIndex);
|
||||
s.writeS32(16, m_workspaceIndex);
|
||||
s.writeBlob(17, m_geometryBytes);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -106,6 +109,8 @@ bool XTRXOutputSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readU32(15, &uintval, 0);
|
||||
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
|
||||
d.readS32(16, &m_workspaceIndex, 0);
|
||||
d.readBlob(17, &m_geometryBytes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -49,6 +49,8 @@ struct XTRXOutputSettings
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
int m_workspaceIndex;
|
||||
QByteArray m_geometryBytes;
|
||||
|
||||
XTRXOutputSettings();
|
||||
void resetToDefaults();
|
||||
|
@ -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();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user