PLutoSDR MIMO: GUI fixes

This commit is contained in:
f4exb 2021-05-04 21:34:46 +02:00
parent 94d037aa16
commit e58758e503
3 changed files with 22 additions and 5 deletions

View File

@ -875,11 +875,11 @@ bool PlutoSDRMIMO::applySettings(const PlutoSDRMIMOSettings& settings, bool forc
if (forwardChangeTxDSP)
{
qDebug("PlutoSDROutput::applySettings: forward change to self");
int sampleRate = m_settings.m_devSampleRate/(1<<m_settings.m_log2Interp);
DSPSignalNotification *notif = new DSPSignalNotification(sampleRate, m_settings.m_txCenterFrequency);
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
int sampleRate = settings.m_devSampleRate/(1<<settings.m_log2Interp);
DSPMIMOSignalNotification *notif0 = new DSPMIMOSignalNotification(sampleRate, settings.m_txCenterFrequency, false, 0);
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif0);
DSPMIMOSignalNotification *notif1 = new DSPMIMOSignalNotification(sampleRate, settings.m_txCenterFrequency, false, 1);
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif1);
}
return true;

View File

@ -169,6 +169,7 @@ void PlutoSDRMIMOGUI::displaySettings()
ui->lpFIREnable->setChecked(m_settings.m_lpfRxFIREnable);
ui->lpFIR->setValue(m_settings.m_lpfRxFIRBW / 1000);
ui->lpFIRDecimation->setCurrentIndex(m_settings.m_lpfRxFIRlog2Decim);
updateGainCombo();
ui->lpFIRGain->setCurrentIndex((m_settings.m_lpfRxFIRGain + 12)/6);
ui->lpFIRDecimation->setEnabled(m_settings.m_lpfRxFIREnable);
ui->lpFIRGain->setEnabled(m_settings.m_lpfRxFIREnable);
@ -211,6 +212,7 @@ void PlutoSDRMIMOGUI::displaySettings()
ui->lpFIREnable->setChecked(m_settings.m_lpfTxFIREnable);
ui->lpFIR->setValue(m_settings.m_lpfTxFIRBW / 1000);
ui->lpFIRDecimation->setCurrentIndex(m_settings.m_lpfTxFIRlog2Interp);
updateGainCombo();
ui->lpFIRGain->setCurrentIndex((m_settings.m_lpfTxFIRGain + 6)/6);
ui->lpFIRDecimation->setEnabled(m_settings.m_lpfTxFIREnable);
ui->lpFIRGain->setEnabled(m_settings.m_lpfTxFIREnable);
@ -535,6 +537,20 @@ void PlutoSDRMIMOGUI::updateStatus()
m_statusCounter++;
}
void PlutoSDRMIMOGUI::updateGainCombo()
{
ui->lpFIRGain->blockSignals(true);
ui->lpFIRGain->clear();
if (m_rxElseTx) {
ui->lpFIRGain->addItems(QStringList{"-12", "-6", "0", "+6"});
} else {
ui->lpFIRGain->addItems(QStringList{"-6", "0"});
}
ui->lpFIRGain->blockSignals(false);
}
void PlutoSDRMIMOGUI::on_streamSide_currentIndexChanged(int index)
{
m_rxElseTx = index == 0;

View File

@ -86,6 +86,7 @@ private slots:
void handleInputMessages();
void updateHardware();
void updateStatus();
void updateGainCombo();
void on_streamSide_currentIndexChanged(int index);
void on_streamIndex_currentIndexChanged(int index);
void on_spectrumSide_currentIndexChanged(int index);