diff --git a/devices/plutosdr/deviceplutosdr.cpp b/devices/plutosdr/deviceplutosdr.cpp index 54d2d164e..a0792218e 100644 --- a/devices/plutosdr/deviceplutosdr.cpp +++ b/devices/plutosdr/deviceplutosdr.cpp @@ -19,8 +19,8 @@ const uint64_t DevicePlutoSDR::loLowLimitFreq = 70000000UL; // 70 MHz: take AD9364 specs const uint64_t DevicePlutoSDR::loHighLimitFreq = 6000000000UL; // 6 GHz: take AD9364 specs -const uint32_t DevicePlutoSDR::srLowLimitFreq = 200000; // 200 kS/s -const uint32_t DevicePlutoSDR::srHighLimitFreq = 2000000; // 20 MS/s: take AD9363 speces +const uint32_t DevicePlutoSDR::srLowLimitFreq = 200000; // 200 kS/s +const uint32_t DevicePlutoSDR::srHighLimitFreq = 20000000; // 20 MS/s: take AD9363 speces const uint32_t DevicePlutoSDR::bbLPRxLowLimitFreq = 200000; // 200 kHz const uint32_t DevicePlutoSDR::bbLPRxHighLimitFreq = 14000000; // 14 MHz diff --git a/devices/plutosdr/deviceplutosdrbox.cpp b/devices/plutosdr/deviceplutosdrbox.cpp index 5c58782b8..db6b4cb98 100644 --- a/devices/plutosdr/deviceplutosdrbox.cpp +++ b/devices/plutosdr/deviceplutosdrbox.cpp @@ -113,6 +113,23 @@ bool DevicePlutoSDRBox::get_param(DeviceType devType, const std::string ¶m, char valuestr[256]; int ret; ssize_t nchars; + iio_device *dev; + + switch (devType) + { + case DEVICE_PHY: + dev = m_devPhy; + break; + case DEVICE_RX: + dev = m_devRx; + break; + case DEVICE_TX: + dev = m_devTx; + break; + default: + dev = m_devPhy; + break; + } ret = iio_device_identify_filename(dev, param.c_str(), &chn, &attr); diff --git a/devices/plutosdr/deviceplutosdrparams.cpp b/devices/plutosdr/deviceplutosdrparams.cpp index 8fc495321..6b07239e5 100644 --- a/devices/plutosdr/deviceplutosdrparams.cpp +++ b/devices/plutosdr/deviceplutosdrparams.cpp @@ -29,7 +29,7 @@ DevicePlutoSDRParams::~DevicePlutoSDRParams() bool DevicePlutoSDRParams::open(const std::string& serial) { - m_box = DevicePlutoSDR::getDeviceFromSerial(serial); + m_box = DevicePlutoSDR::instance().getDeviceFromSerial(serial); return m_box != 0; } diff --git a/devices/plutosdr/deviceplutosdrshared.h b/devices/plutosdr/deviceplutosdrshared.h index 9e8657882..0a0fa8b58 100644 --- a/devices/plutosdr/deviceplutosdrshared.h +++ b/devices/plutosdr/deviceplutosdrshared.h @@ -17,6 +17,8 @@ #ifndef DEVICES_PLUTOSDR_DEVICEPLUTOSDRSHARED_H_ #define DEVICES_PLUTOSDR_DEVICEPLUTOSDRSHARED_H_ +class DevicePlutoSDRParams; + /** * Structure shared by a buddy with other buddies */ diff --git a/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp b/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp index ef0f13deb..0d4d24668 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp +++ b/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp @@ -36,12 +36,6 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent) m_sampleSource = new PlutoSDRInput(m_deviceAPI); m_deviceAPI->setSource(m_sampleSource); - float minF, maxF, stepF; - // TODO: call device core to get values - minF = 100000; - maxF = 4000000; - stepF = 1000; - ui->setupUi(this); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setValueRange(7, DevicePlutoSDR::loLowLimitFreq/1000, DevicePlutoSDR::loHighLimitFreq/1000); @@ -55,6 +49,9 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent) ui->lpFIR->setColorMapper(ColorMapper(ColorMapper::GrayYellow)); ui->lpFIR->setValueRange(5, 1U, 56000U); // will be dynamically recalculated + ui->hwDecimLabel->setText(QString::fromUtf8("H\u2193")); + ui->swDecimLabel->setText(QString::fromUtf8("S\u2193")); + connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware())); connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); diff --git a/plugins/samplesource/plutosdrinput/plutosdrinputgui.ui b/plugins/samplesource/plutosdrinput/plutosdrinputgui.ui index 0580cc607..49ffff8cc 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinputgui.ui +++ b/plugins/samplesource/plutosdrinput/plutosdrinputgui.ui @@ -548,7 +548,6 @@ Analog lowpass filer bandwidth (kHz) - lpfUnits @@ -928,6 +927,13 @@ + + + + Qt::Vertical + + +