diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp
index 28caab7a3..9196761b1 100644
--- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp
+++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp
@@ -10,7 +10,7 @@ RTLSDRGui::RTLSDRGui(PluginAPI* pluginAPI, QWidget* parent) :
m_sampleSource(NULL)
{
ui->setupUi(this);
- ui->centerFrequency->setValueRange(7, 28900U, 1700000U);
+ ui->centerFrequency->setValueRange(7, 28500U, 1700000U);
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
displaySettings();
@@ -157,28 +157,21 @@ void RTLSDRGui::updateHardware()
void RTLSDRGui::on_checkBox_stateChanged(int state) {
if (state == Qt::Checked){
- ((RTLSDRInput*)m_sampleSource)->set_ds_mode((ui->radioButton->isChecked()) ? true : false);
- ui->radioButton->setEnabled(true);
- ui->radioButton_2->setEnabled(true);
+ // Direct Modes: 0: off, 1: I, 2: Q, 3: NoMod.
+ ((RTLSDRInput*)m_sampleSource)->set_ds_mode(3);
ui->gain->setEnabled(false);
- ui->centerFrequency->setValueRange(7, 1000U, 28700U);
- ui->centerFrequency->setValue(27000);
+ ui->centerFrequency->setValueRange(7, 1000U, 275000U);
+ ui->centerFrequency->setValue(7000);
+ m_generalSettings.m_centerFrequency = 7000 * 1000;
}
else {
((RTLSDRInput*)m_sampleSource)->set_ds_mode(0);
- ui->radioButton->setEnabled(false);
- ui->radioButton_2->setEnabled(false);
ui->gain->setEnabled(true);
- ui->centerFrequency->setValueRange(7, 28900U, 1700000U);
- ui->centerFrequency->setValue(29000);
+ ui->centerFrequency->setValueRange(7, 28500U, 1700000U);
+ ui->centerFrequency->setValue(434000);
+ ui->gain->setValue(0);
+ m_generalSettings.m_centerFrequency = 434000 * 1000;
}
+ sendSettings();
}
-void RTLSDRGui::on_radioButton_toggled(bool checked){
- if (checked)
- ((RTLSDRInput*)m_sampleSource)->set_ds_mode(1);
-}
-void RTLSDRGui::on_radioButton_2_toggled(bool checked){
- if (checked)
- ((RTLSDRInput*)m_sampleSource)->set_ds_mode(2);
-}
diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.h b/plugins/samplesource/rtlsdr/rtlsdrgui.h
index 19d23e05e..c5031dba0 100644
--- a/plugins/samplesource/rtlsdr/rtlsdrgui.h
+++ b/plugins/samplesource/rtlsdr/rtlsdrgui.h
@@ -47,9 +47,6 @@ private slots:
void on_gain_valueChanged(int value);
void on_samplerate_valueChanged(int value);
void on_checkBox_stateChanged(int state);
- void on_radioButton_toggled(bool checked);
- void on_radioButton_2_toggled(bool checked);
-
void updateHardware();
};
diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.ui b/plugins/samplesource/rtlsdr/rtlsdrgui.ui
index 490027fc1..9be23107b 100644
--- a/plugins/samplesource/rtlsdr/rtlsdrgui.ui
+++ b/plugins/samplesource/rtlsdr/rtlsdrgui.ui
@@ -226,33 +226,7 @@
-
- Direct Sampling:
-
-
-
- -
-
-
- false
-
-
- I
-
-
- true
-
-
- true
-
-
-
- -
-
-
- false
-
-
- Q
+ No-mod Direct Sampling
diff --git a/plugins/samplesource/rtlsdr/rtlsdrthread.h b/plugins/samplesource/rtlsdr/rtlsdrthread.h
index edb055a4c..13983b003 100644
--- a/plugins/samplesource/rtlsdr/rtlsdrthread.h
+++ b/plugins/samplesource/rtlsdr/rtlsdrthread.h
@@ -23,7 +23,6 @@
#include
#include
#include "dsp/samplefifo.h"
-#include "dsp/inthalfbandfilter.h"
class RTLSDRThread : public QThread {
Q_OBJECT
@@ -34,8 +33,7 @@ public:
void startWork();
void stopWork();
-
- void setSamplerate(int sanplerate);
+ void setSamplerate(int samplerate);
private:
QMutex m_startWaitMutex;
@@ -49,7 +47,6 @@ private:
int m_samplerate;
void run();
-
void decimate2(SampleVector::iterator* it, const quint8* buf, qint32 len);
void decimate4(SampleVector::iterator* it, const quint8* buf, qint32 len);
void decimate8(SampleVector::iterator* it, const quint8* buf, qint32 len);