From e58758e503d9cdc35f2ebf87d6ed0614e85d4c9f Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 4 May 2021 21:34:46 +0200 Subject: [PATCH] PLutoSDR MIMO: GUI fixes --- plugins/samplemimo/plutosdrmimo/plutosdrmimo.cpp | 10 +++++----- .../samplemimo/plutosdrmimo/plutosdrmimogui.cpp | 16 ++++++++++++++++ .../samplemimo/plutosdrmimo/plutosdrmimogui.h | 1 + 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/plugins/samplemimo/plutosdrmimo/plutosdrmimo.cpp b/plugins/samplemimo/plutosdrmimo/plutosdrmimo.cpp index 740710233..8ac24679d 100644 --- a/plugins/samplemimo/plutosdrmimo/plutosdrmimo.cpp +++ b/plugins/samplemimo/plutosdrmimo/plutosdrmimo.cpp @@ -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<getDeviceEngineInputMessageQueue()->push(notif); + int sampleRate = settings.m_devSampleRate/(1<getDeviceEngineInputMessageQueue()->push(notif0); + DSPMIMOSignalNotification *notif1 = new DSPMIMOSignalNotification(sampleRate, settings.m_txCenterFrequency, false, 1); + m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif1); } return true; diff --git a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp index 98654f451..8537333d4 100644 --- a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp +++ b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp @@ -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; diff --git a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.h b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.h index e050e0126..0f58ffd8d 100644 --- a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.h +++ b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.h @@ -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);