1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 01:18:38 -05:00

Metis MISO: set s[ectrum sink input back in GUI. Fixes #1145

This commit is contained in:
f4exb 2022-02-11 01:04:09 +01:00
parent fce235b2bc
commit 04ed8d3d0b
2 changed files with 7 additions and 10 deletions

View File

@ -312,8 +312,8 @@ bool MetisMISO::applySettings(const MetisMISOSettings& settings, bool force)
<< " m_dcBlock:" << settings.m_dcBlock
<< " m_iqCorrection:" << settings.m_iqCorrection
<< " m_txDrive:" << settings.m_txDrive
<< " m_streamIndex:" << m_settings.m_streamIndex
<< " m_spectrumStreamIndex:" << m_settings.m_spectrumStreamIndex
<< " m_streamIndex:" << settings.m_streamIndex
<< " m_spectrumStreamIndex:" << settings.m_spectrumStreamIndex
<< " m_useReverseAPI: " << settings.m_useReverseAPI
<< " m_reverseAPIAddress: " << settings.m_reverseAPIAddress
<< " m_reverseAPIPort: " << settings.m_reverseAPIPort
@ -448,15 +448,8 @@ bool MetisMISO::applySettings(const MetisMISOSettings& settings, bool force)
reverseAPIKeys.append("streamIndex");
}
if ((m_settings.m_spectrumStreamIndex != settings.m_spectrumStreamIndex) || force)
{
if ((m_settings.m_spectrumStreamIndex != settings.m_spectrumStreamIndex) || force) {
reverseAPIKeys.append("spectrumStreamIndex");
if (settings.m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers) {
m_deviceAPI->setSpectrumSinkInput(true, m_settings.m_spectrumStreamIndex);
} else {
m_deviceAPI->setSpectrumSinkInput(false, 0);
}
}
if (propagateSettings) {

View File

@ -138,11 +138,13 @@ void MetisMISOGui::on_streamIndex_currentIndexChanged(int index)
if (m_settings.m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers)
{
m_deviceUISet->m_spectrum->setDisplayedStream(true, index);
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(true, m_settings.m_spectrumStreamIndex);
m_deviceUISet->setSpectrumScalingFactor(SDR_RX_SCALEF);
}
else
{
m_deviceUISet->m_spectrum->setDisplayedStream(false, 0);
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(false, 0);
m_deviceUISet->setSpectrumScalingFactor(SDR_TX_SCALEF);
}
@ -168,11 +170,13 @@ void MetisMISOGui::on_spectrumSource_currentIndexChanged(int index)
if (m_settings.m_spectrumStreamIndex < MetisMISOSettings::m_maxReceivers)
{
m_deviceUISet->m_spectrum->setDisplayedStream(true, index);
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(true, m_settings.m_spectrumStreamIndex);
m_deviceUISet->setSpectrumScalingFactor(SDR_RX_SCALEF);
}
else
{
m_deviceUISet->m_spectrum->setDisplayedStream(false, 0);
m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(false, 0);
m_deviceUISet->setSpectrumScalingFactor(SDR_TX_SCALEF);
}