mirror of https://github.com/f4exb/sdrangel.git
No-Mod Direct Sampling.
This commit is contained in:
parent
812d0f4d15
commit
f793f635af
|
@ -10,7 +10,7 @@ RTLSDRGui::RTLSDRGui(PluginAPI* pluginAPI, QWidget* parent) :
|
||||||
m_sampleSource(NULL)
|
m_sampleSource(NULL)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->centerFrequency->setValueRange(7, 28900U, 1700000U);
|
ui->centerFrequency->setValueRange(7, 28500U, 1700000U);
|
||||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||||
displaySettings();
|
displaySettings();
|
||||||
|
|
||||||
|
@ -157,28 +157,21 @@ void RTLSDRGui::updateHardware()
|
||||||
|
|
||||||
void RTLSDRGui::on_checkBox_stateChanged(int state) {
|
void RTLSDRGui::on_checkBox_stateChanged(int state) {
|
||||||
if (state == Qt::Checked){
|
if (state == Qt::Checked){
|
||||||
((RTLSDRInput*)m_sampleSource)->set_ds_mode((ui->radioButton->isChecked()) ? true : false);
|
// Direct Modes: 0: off, 1: I, 2: Q, 3: NoMod.
|
||||||
ui->radioButton->setEnabled(true);
|
((RTLSDRInput*)m_sampleSource)->set_ds_mode(3);
|
||||||
ui->radioButton_2->setEnabled(true);
|
|
||||||
ui->gain->setEnabled(false);
|
ui->gain->setEnabled(false);
|
||||||
ui->centerFrequency->setValueRange(7, 1000U, 28700U);
|
ui->centerFrequency->setValueRange(7, 1000U, 275000U);
|
||||||
ui->centerFrequency->setValue(27000);
|
ui->centerFrequency->setValue(7000);
|
||||||
|
m_generalSettings.m_centerFrequency = 7000 * 1000;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
((RTLSDRInput*)m_sampleSource)->set_ds_mode(0);
|
((RTLSDRInput*)m_sampleSource)->set_ds_mode(0);
|
||||||
ui->radioButton->setEnabled(false);
|
|
||||||
ui->radioButton_2->setEnabled(false);
|
|
||||||
ui->gain->setEnabled(true);
|
ui->gain->setEnabled(true);
|
||||||
ui->centerFrequency->setValueRange(7, 28900U, 1700000U);
|
ui->centerFrequency->setValueRange(7, 28500U, 1700000U);
|
||||||
ui->centerFrequency->setValue(29000);
|
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);
|
|
||||||
}
|
|
||||||
|
|
|
@ -47,9 +47,6 @@ private slots:
|
||||||
void on_gain_valueChanged(int value);
|
void on_gain_valueChanged(int value);
|
||||||
void on_samplerate_valueChanged(int value);
|
void on_samplerate_valueChanged(int value);
|
||||||
void on_checkBox_stateChanged(int state);
|
void on_checkBox_stateChanged(int state);
|
||||||
void on_radioButton_toggled(bool checked);
|
|
||||||
void on_radioButton_2_toggled(bool checked);
|
|
||||||
|
|
||||||
void updateHardware();
|
void updateHardware();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -226,33 +226,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox">
|
<widget class="QCheckBox" name="checkBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Direct Sampling: </string>
|
<string>No-mod Direct Sampling</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButton">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>I</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButton_2">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Q</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
#include <rtl-sdr.h>
|
#include <rtl-sdr.h>
|
||||||
#include "dsp/samplefifo.h"
|
#include "dsp/samplefifo.h"
|
||||||
#include "dsp/inthalfbandfilter.h"
|
|
||||||
|
|
||||||
class RTLSDRThread : public QThread {
|
class RTLSDRThread : public QThread {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -34,8 +33,7 @@ public:
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
void stopWork();
|
void stopWork();
|
||||||
|
void setSamplerate(int samplerate);
|
||||||
void setSamplerate(int sanplerate);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMutex m_startWaitMutex;
|
QMutex m_startWaitMutex;
|
||||||
|
@ -49,7 +47,6 @@ private:
|
||||||
int m_samplerate;
|
int m_samplerate;
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
void decimate2(SampleVector::iterator* it, const quint8* buf, qint32 len);
|
void decimate2(SampleVector::iterator* it, const quint8* buf, qint32 len);
|
||||||
void decimate4(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);
|
void decimate8(SampleVector::iterator* it, const quint8* buf, qint32 len);
|
||||||
|
|
Loading…
Reference in New Issue