DATV plugin: added dial to flip through DATV standard symbol rates
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
@ -40,6 +40,18 @@
|
||||
#include "datvdemodgui.h"
|
||||
|
||||
const char* const DATVDemodGUI::m_strChannelID = "sdrangel.channel.demoddatv";
|
||||
const QList<int> DATVDemodGUI::m_symbolRates = {
|
||||
25000,
|
||||
33000,
|
||||
66000,
|
||||
125000,
|
||||
250000,
|
||||
333000,
|
||||
500000,
|
||||
1000000,
|
||||
1500000,
|
||||
2000000
|
||||
};
|
||||
|
||||
DATVDemodGUI* DATVDemodGUI::create(PluginAPI* objPluginAPI,
|
||||
DeviceUISet *deviceUISet,
|
||||
@ -343,6 +355,7 @@ void DATVDemodGUI::displaySettings()
|
||||
ui->chkViterbi->setChecked(m_settings.m_viterbi);
|
||||
ui->softLDPC->setChecked(m_settings.m_softLDPC);
|
||||
ui->maxBitflips->setValue(m_settings.m_maxBitflips);
|
||||
ui->datvStdSR->setValue(indexFromSymbolRate(m_settings.m_symbolRate));
|
||||
|
||||
if (m_settings.m_standard == DATVDemodSettings::dvb_version::DVB_S)
|
||||
{
|
||||
@ -732,6 +745,18 @@ void DATVDemodGUI::on_resetDefaults_clicked()
|
||||
void DATVDemodGUI::on_spiSymbolRate_valueChanged(int value)
|
||||
{
|
||||
m_settings.m_symbolRate = value;
|
||||
ui->datvStdSR->blockSignals(true);
|
||||
ui->datvStdSR->setValue(indexFromSymbolRate(value));
|
||||
ui->datvStdSR->blockSignals(false);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void DATVDemodGUI::on_datvStdSR_valueChanged(int value)
|
||||
{
|
||||
m_settings.m_symbolRate = symbolRateFromIndex(value);
|
||||
ui->spiSymbolRate->blockSignals(true);
|
||||
ui->spiSymbolRate->setValue(m_settings.m_symbolRate);
|
||||
ui->spiSymbolRate->blockSignals(false);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
@ -946,6 +971,7 @@ void DATVDemodGUI::makeUIConnections()
|
||||
QObject::connect(ui->chkHardMetric, &QCheckBox::clicked, this, &DATVDemodGUI::on_chkHardMetric_clicked);
|
||||
QObject::connect(ui->resetDefaults, &QPushButton::clicked, this, &DATVDemodGUI::on_resetDefaults_clicked);
|
||||
QObject::connect(ui->spiSymbolRate, QOverload<int>::of(&QSpinBox::valueChanged), this, &DATVDemodGUI::on_spiSymbolRate_valueChanged);
|
||||
QObject::connect(ui->datvStdSR, &QDial::valueChanged, this, &DATVDemodGUI::on_datvStdSR_valueChanged);
|
||||
QObject::connect(ui->spiNotchFilters, QOverload<int>::of(&QSpinBox::valueChanged), this, &DATVDemodGUI::on_spiNotchFilters_valueChanged);
|
||||
QObject::connect(ui->chkAllowDrift, &QCheckBox::clicked, this, &DATVDemodGUI::on_chkAllowDrift_clicked);
|
||||
QObject::connect(ui->fullScreen, &QPushButton::clicked, this, &DATVDemodGUI::on_fullScreen_clicked);
|
||||
@ -968,3 +994,28 @@ void DATVDemodGUI::updateAbsoluteCenterFrequency()
|
||||
{
|
||||
setStatusFrequency(m_deviceCenterFrequency + m_settings.m_centerFrequency);
|
||||
}
|
||||
|
||||
int DATVDemodGUI::indexFromSymbolRate(int sampleRate)
|
||||
{
|
||||
int index = 0;
|
||||
|
||||
if (sampleRate < m_symbolRates[1]) {
|
||||
return index;
|
||||
}
|
||||
|
||||
for (auto definedRate : m_symbolRates)
|
||||
{
|
||||
if (sampleRate <= definedRate) {
|
||||
return index;
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
int DATVDemodGUI::symbolRateFromIndex(int index)
|
||||
{
|
||||
return m_symbolRates.at(index);
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ private slots:
|
||||
void on_chkHardMetric_clicked();
|
||||
void on_resetDefaults_clicked();
|
||||
void on_spiSymbolRate_valueChanged(int arg1);
|
||||
void on_datvStdSR_valueChanged(int value);
|
||||
void on_spiNotchFilters_valueChanged(int arg1);
|
||||
void on_chkAllowDrift_clicked();
|
||||
void on_fullScreen_clicked();
|
||||
@ -136,6 +137,7 @@ private:
|
||||
bool m_cstlnSetByModcod;
|
||||
|
||||
MovingAverageUtil<double, double, 4> m_objMagSqAverage;
|
||||
static const QList<int> m_symbolRates;
|
||||
|
||||
explicit DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* objParent = 0);
|
||||
virtual ~DATVDemodGUI();
|
||||
@ -153,6 +155,8 @@ private:
|
||||
bool handleMessage(const Message& objMessage);
|
||||
void makeUIConnections();
|
||||
void updateAbsoluteCenterFrequency();
|
||||
int indexFromSymbolRate(int sampleRate);
|
||||
int symbolRateFromIndex(int index);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_DATVDEMODGUI_H
|
||||
|
@ -485,12 +485,12 @@
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>40</y>
|
||||
<width>61</width>
|
||||
<width>41</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Symbols/s</string>
|
||||
<string>Sym/s</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkAllowDrift">
|
||||
@ -589,7 +589,7 @@
|
||||
<widget class="QSpinBox" name="spiSymbolRate">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<x>140</x>
|
||||
<y>40</y>
|
||||
<width>81</width>
|
||||
<height>23</height>
|
||||
@ -805,6 +805,37 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDial" name="datvStdSR">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>40</y>
|
||||
<width>24</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select a DATV standard sample rate</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="playerIndicator">
|
||||
<property name="geometry">
|
||||
|
@ -108,6 +108,10 @@ The constellations are as follows:
|
||||
|
||||
This controls the expected symbol rate in symbols per second
|
||||
|
||||
<h5>B.2a.3a: Set standard DATV symbol rate</h5>
|
||||
|
||||
Use this dial to flip through standard DATV symbol rates: 25, 33, 66, 125, 250, 333, 500, 1000, 1500, 2000 kSym/S
|
||||
|
||||
<h5>B.2a.4: FEC rate</h5>
|
||||
|
||||
Dpends on the standard and modulation
|
||||
|