From 0a3505cec36ef58fc60553806d74901ae19f99d6 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 16 Oct 2021 11:33:56 +0200 Subject: [PATCH] Metis MISO: set absolute maximum frequency to 500 MHz. Fixes #1014 --- plugins/samplemimo/metismiso/metismisogui.cpp | 10 +++++----- plugins/samplemimo/metismiso/metismisogui.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/samplemimo/metismiso/metismisogui.cpp b/plugins/samplemimo/metismiso/metismisogui.cpp index dab5f5844..bfda504f5 100644 --- a/plugins/samplemimo/metismiso/metismisogui.cpp +++ b/plugins/samplemimo/metismiso/metismisogui.cpp @@ -60,7 +60,7 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) : ui->setupUi(this); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); - ui->centerFrequency->setValueRange(7, 0, 61440000); + ui->centerFrequency->setValueRange(7, 0, m_absMaxFreq); displaySettings(); @@ -483,19 +483,19 @@ void MetisMISOGui::displayFrequency() { int subsamplingIndex = m_settings.m_rxSubsamplingIndexes[m_streamIndex]; centerFrequency = m_settings.m_rxCenterFrequencies[m_streamIndex]; - fBaseLow = subsamplingIndex*61440; - fBaseHigh = (subsamplingIndex+1)*61440; + fBaseLow = subsamplingIndex*m_absMaxFreq; + fBaseHigh = (subsamplingIndex+1)*m_absMaxFreq; } else if (m_streamIndex == MetisMISOSettings::m_maxReceivers) { centerFrequency = m_settings.m_txCenterFrequency; fBaseLow = 0; - fBaseHigh = 61440; + fBaseHigh = m_absMaxFreq; } else { fBaseLow = 0; - fBaseHigh = 61440; + fBaseHigh = m_absMaxFreq; centerFrequency = 0; } diff --git a/plugins/samplemimo/metismiso/metismisogui.h b/plugins/samplemimo/metismiso/metismisogui.h index 96a33bfcb..69b649dce 100644 --- a/plugins/samplemimo/metismiso/metismisogui.h +++ b/plugins/samplemimo/metismiso/metismisogui.h @@ -65,6 +65,7 @@ private: std::vector m_deviceCenterFrequencies; //!< Center frequency in device int m_lastEngineState; MessageQueue m_inputMessageQueue; + static const int m_absMaxFreq = 500000; // kHz void blockApplySettings(bool block) { m_doApplySettings = !block; } void displaySettings();