1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

plutosdr: grab the RF bandwidth range from the device

This will use the RF bandwidth from the device, which is different
between AD9363 and AD9364.

Things are now managed like the device likes - analog low pass bandwidth
is RF (complex) bandwidth, not baseband single I or Q bandwidth.

Signed-off-by: Robin Getz <robin.getz@analog.com>
This commit is contained in:
Robin Getz
2019-02-01 16:42:08 -05:00
parent 1480b393fb
commit 95edff4985
8 changed files with 75 additions and 2 deletions
@@ -685,6 +685,16 @@ void PlutoSDRInput::getLORange(qint64& minLimit, qint64& maxLimit)
maxLimit = max;
}
void PlutoSDRInput::getbbLPRange(quint32& minLimit, quint32& maxLimit)
{
uint32_t min, max;
DevicePlutoSDRBox *plutoBox = m_deviceShared.m_deviceParams->getBox();
plutoBox->getbbLPRxRange(min, max);
minLimit = min;
maxLimit = max;
}
void PlutoSDRInput::getGain(int& gaindB)
{
DevicePlutoSDRBox *plutoBox = m_deviceShared.m_deviceParams->getBox();
@@ -144,6 +144,7 @@ public:
uint32_t getFIRSampleRate() const { return m_deviceSampleRates.m_hb1Rate; }
void getRSSI(std::string& rssiStr);
void getLORange(qint64& minLimit, qint64& maxLimit);
void getbbLPRange(quint32& minLimit, quint32& maxLimit);
void getGain(int& gainStr);
bool fetchTemperature();
float getTemperature();
@@ -53,7 +53,10 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
ui->sampleRate->setValueRange(8, DevicePlutoSDR::srLowLimitFreq, DevicePlutoSDR::srHighLimitFreq);
ui->lpf->setColorMapper(ColorMapper(ColorMapper::GrayYellow));
ui->lpf->setValueRange(5, DevicePlutoSDR::bbLPRxLowLimitFreq/1000, DevicePlutoSDR::bbLPRxHighLimitFreq/1000);
quint32 minLimit, maxLimit;
((PlutoSDRInput *) m_sampleSource)->getbbLPRange(minLimit, maxLimit);
ui->lpf->setValueRange(5, minLimit/1000, maxLimit/1000);
ui->lpFIR->setColorMapper(ColorMapper(ColorMapper::GrayYellow));
ui->lpFIR->setValueRange(5, 1U, 56000U); // will be dynamically recalculated