mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 11:12:27 -04:00
DSD demod: added possibility to enable/disable the symbol PLL
This commit is contained in:
parent
5c8b7fd606
commit
0e70c84f45
@ -69,6 +69,7 @@ public:
|
|||||||
void setMyPoint(float lat, float lon) { m_decoder.setMyPoint(lat, lon); }
|
void setMyPoint(float lat, float lon) { m_decoder.setMyPoint(lat, lon); }
|
||||||
void setAudioGain(float gain) { m_decoder.setAudioGain(gain); }
|
void setAudioGain(float gain) { m_decoder.setAudioGain(gain); }
|
||||||
void setBaudRate(int baudRate);
|
void setBaudRate(int baudRate);
|
||||||
|
void setSymbolPLLLock(bool pllLock) { m_decoder.setSymbolPLLLock(pllLock); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DSDcc::DSDDecoder m_decoder;
|
DSDcc::DSDDecoder m_decoder;
|
||||||
|
@ -95,7 +95,8 @@ void DSDDemod::configure(MessageQueue* messageQueue,
|
|||||||
bool syncOrConstellation,
|
bool syncOrConstellation,
|
||||||
bool slot1On,
|
bool slot1On,
|
||||||
bool slot2On,
|
bool slot2On,
|
||||||
bool tdmaStereo)
|
bool tdmaStereo,
|
||||||
|
bool pllLock)
|
||||||
{
|
{
|
||||||
Message* cmd = MsgConfigureDSDDemod::create(rfBandwidth,
|
Message* cmd = MsgConfigureDSDDemod::create(rfBandwidth,
|
||||||
demodGain,
|
demodGain,
|
||||||
@ -109,7 +110,8 @@ void DSDDemod::configure(MessageQueue* messageQueue,
|
|||||||
syncOrConstellation,
|
syncOrConstellation,
|
||||||
slot1On,
|
slot1On,
|
||||||
slot2On,
|
slot2On,
|
||||||
tdmaStereo);
|
tdmaStereo,
|
||||||
|
pllLock);
|
||||||
messageQueue->push(cmd);
|
messageQueue->push(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,6 +365,7 @@ bool DSDDemod::handleMessage(const Message& cmd)
|
|||||||
m_config.m_slot1On = cfg.getSlot1On();
|
m_config.m_slot1On = cfg.getSlot1On();
|
||||||
m_config.m_slot2On = cfg.getSlot2On();
|
m_config.m_slot2On = cfg.getSlot2On();
|
||||||
m_config.m_tdmaStereo = cfg.getTDMAStereo();
|
m_config.m_tdmaStereo = cfg.getTDMAStereo();
|
||||||
|
m_config.m_pllLock = cfg.getPLLLock();
|
||||||
|
|
||||||
apply();
|
apply();
|
||||||
|
|
||||||
@ -378,7 +381,8 @@ bool DSDDemod::handleMessage(const Message& cmd)
|
|||||||
<< " m_syncOrConstellation: " << m_config.m_syncOrConstellation
|
<< " m_syncOrConstellation: " << m_config.m_syncOrConstellation
|
||||||
<< " m_slot1On: " << m_config.m_slot1On
|
<< " m_slot1On: " << m_config.m_slot1On
|
||||||
<< " m_slot2On: " << m_config.m_slot2On
|
<< " m_slot2On: " << m_config.m_slot2On
|
||||||
<< " m_tdmaStereo: " << m_config.m_tdmaStereo;
|
<< " m_tdmaStereo: " << m_config.m_tdmaStereo
|
||||||
|
<< " m_pllLock: " << m_config.m_pllLock;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -451,6 +455,11 @@ void DSDDemod::apply()
|
|||||||
m_dsdDecoder.setTDMAStereo(m_config.m_tdmaStereo);
|
m_dsdDecoder.setTDMAStereo(m_config.m_tdmaStereo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_config.m_pllLock != m_running.m_pllLock)
|
||||||
|
{
|
||||||
|
m_dsdDecoder.setSymbolPLLLock(m_config.m_pllLock);
|
||||||
|
}
|
||||||
|
|
||||||
m_running.m_inputSampleRate = m_config.m_inputSampleRate;
|
m_running.m_inputSampleRate = m_config.m_inputSampleRate;
|
||||||
m_running.m_inputFrequencyOffset = m_config.m_inputFrequencyOffset;
|
m_running.m_inputFrequencyOffset = m_config.m_inputFrequencyOffset;
|
||||||
m_running.m_rfBandwidth = m_config.m_rfBandwidth;
|
m_running.m_rfBandwidth = m_config.m_rfBandwidth;
|
||||||
@ -467,4 +476,5 @@ void DSDDemod::apply()
|
|||||||
m_running.m_slot1On = m_config.m_slot1On;
|
m_running.m_slot1On = m_config.m_slot1On;
|
||||||
m_running.m_slot2On = m_config.m_slot2On;
|
m_running.m_slot2On = m_config.m_slot2On;
|
||||||
m_running.m_tdmaStereo = m_config.m_tdmaStereo;
|
m_running.m_tdmaStereo = m_config.m_tdmaStereo;
|
||||||
|
m_running.m_pllLock = m_config.m_pllLock;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,8 @@ public:
|
|||||||
bool syncOrConstellation,
|
bool syncOrConstellation,
|
||||||
bool slot1On,
|
bool slot1On,
|
||||||
bool slot2On,
|
bool slot2On,
|
||||||
bool tdmaStereo);
|
bool tdmaStereo,
|
||||||
|
bool pllLock);
|
||||||
|
|
||||||
void configureMyPosition(MessageQueue* messageQueue, float myLatitude, float myLongitude);
|
void configureMyPosition(MessageQueue* messageQueue, float myLatitude, float myLongitude);
|
||||||
|
|
||||||
@ -123,6 +124,7 @@ private:
|
|||||||
bool getSlot1On() const { return m_slot1On; }
|
bool getSlot1On() const { return m_slot1On; }
|
||||||
bool getSlot2On() const { return m_slot2On; }
|
bool getSlot2On() const { return m_slot2On; }
|
||||||
bool getTDMAStereo() const { return m_tdmaStereo; }
|
bool getTDMAStereo() const { return m_tdmaStereo; }
|
||||||
|
bool getPLLLock() const { return m_pllLock; }
|
||||||
|
|
||||||
static MsgConfigureDSDDemod* create(int rfBandwidth,
|
static MsgConfigureDSDDemod* create(int rfBandwidth,
|
||||||
int demodGain,
|
int demodGain,
|
||||||
@ -136,7 +138,8 @@ private:
|
|||||||
bool syncOrConstellation,
|
bool syncOrConstellation,
|
||||||
bool slot1On,
|
bool slot1On,
|
||||||
bool slot2On,
|
bool slot2On,
|
||||||
bool tdmaStereo)
|
bool tdmaStereo,
|
||||||
|
bool pllLock)
|
||||||
{
|
{
|
||||||
return new MsgConfigureDSDDemod(rfBandwidth,
|
return new MsgConfigureDSDDemod(rfBandwidth,
|
||||||
demodGain,
|
demodGain,
|
||||||
@ -150,7 +153,8 @@ private:
|
|||||||
syncOrConstellation,
|
syncOrConstellation,
|
||||||
slot1On,
|
slot1On,
|
||||||
slot2On,
|
slot2On,
|
||||||
tdmaStereo);
|
tdmaStereo,
|
||||||
|
pllLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -167,6 +171,7 @@ private:
|
|||||||
bool m_slot1On;
|
bool m_slot1On;
|
||||||
bool m_slot2On;
|
bool m_slot2On;
|
||||||
bool m_tdmaStereo;
|
bool m_tdmaStereo;
|
||||||
|
bool m_pllLock;
|
||||||
|
|
||||||
MsgConfigureDSDDemod(int rfBandwidth,
|
MsgConfigureDSDDemod(int rfBandwidth,
|
||||||
int demodGain,
|
int demodGain,
|
||||||
@ -180,7 +185,8 @@ private:
|
|||||||
bool syncOrConstellation,
|
bool syncOrConstellation,
|
||||||
bool slot1On,
|
bool slot1On,
|
||||||
bool slot2On,
|
bool slot2On,
|
||||||
bool tdmaStereo) :
|
bool tdmaStereo,
|
||||||
|
bool pllLock) :
|
||||||
Message(),
|
Message(),
|
||||||
m_rfBandwidth(rfBandwidth),
|
m_rfBandwidth(rfBandwidth),
|
||||||
m_demodGain(demodGain),
|
m_demodGain(demodGain),
|
||||||
@ -194,7 +200,8 @@ private:
|
|||||||
m_syncOrConstellation(syncOrConstellation),
|
m_syncOrConstellation(syncOrConstellation),
|
||||||
m_slot1On(slot1On),
|
m_slot1On(slot1On),
|
||||||
m_slot2On(slot2On),
|
m_slot2On(slot2On),
|
||||||
m_tdmaStereo(tdmaStereo)
|
m_tdmaStereo(tdmaStereo),
|
||||||
|
m_pllLock(pllLock)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -226,6 +233,7 @@ private:
|
|||||||
bool m_slot1On;
|
bool m_slot1On;
|
||||||
bool m_slot2On;
|
bool m_slot2On;
|
||||||
bool m_tdmaStereo;
|
bool m_tdmaStereo;
|
||||||
|
bool m_pllLock;
|
||||||
|
|
||||||
Config() :
|
Config() :
|
||||||
m_inputSampleRate(-1),
|
m_inputSampleRate(-1),
|
||||||
@ -243,7 +251,8 @@ private:
|
|||||||
m_syncOrConstellation(false),
|
m_syncOrConstellation(false),
|
||||||
m_slot1On(false),
|
m_slot1On(false),
|
||||||
m_slot2On(false),
|
m_slot2On(false),
|
||||||
m_tdmaStereo(false)
|
m_tdmaStereo(false),
|
||||||
|
m_pllLock(true)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "../../channelrx/demoddsd/dsddemodgui.h"
|
#include "dsddemodgui.h"
|
||||||
|
|
||||||
#include <device/devicesourceapi.h>
|
#include <device/devicesourceapi.h>
|
||||||
#include <dsp/downchannelizer.h>
|
#include <dsp/downchannelizer.h>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
|
#include "dsp/threadedbasebandsamplesink.h"
|
||||||
#include "ui_dsddemodgui.h"
|
#include "ui_dsddemodgui.h"
|
||||||
#include "dsp/scopevis.h"
|
#include "dsp/scopevis.h"
|
||||||
#include "gui/glscope.h"
|
#include "gui/glscope.h"
|
||||||
@ -34,7 +34,7 @@
|
|||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include "../../channelrx/demoddsd/dsddemod.h"
|
#include "dsddemod.h"
|
||||||
|
|
||||||
const QString DSDDemodGUI::m_channelID = "sdrangel.channel.dsddemod";
|
const QString DSDDemodGUI::m_channelID = "sdrangel.channel.dsddemod";
|
||||||
|
|
||||||
@ -86,6 +86,7 @@ void DSDDemodGUI::resetToDefaults()
|
|||||||
ui->squelchGate->setValue(5);
|
ui->squelchGate->setValue(5);
|
||||||
ui->squelch->setValue(-40);
|
ui->squelch->setValue(-40);
|
||||||
ui->deltaFrequency->setValue(0);
|
ui->deltaFrequency->setValue(0);
|
||||||
|
ui->symbolPLLLock->setChecked(true);
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
applySettings();
|
applySettings();
|
||||||
@ -283,6 +284,16 @@ void DSDDemodGUI::on_audioMute_toggled(bool checked)
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DSDDemodGUI::on_symbolPLLLock_toggled(bool checked)
|
||||||
|
{
|
||||||
|
if (checked) {
|
||||||
|
ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
|
} else {
|
||||||
|
ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(53,53,53); }");
|
||||||
|
}
|
||||||
|
applySettings();
|
||||||
|
}
|
||||||
|
|
||||||
void DSDDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
void DSDDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -425,7 +436,8 @@ void DSDDemodGUI::applySettings()
|
|||||||
m_syncOrConstellation,
|
m_syncOrConstellation,
|
||||||
m_slot1On,
|
m_slot1On,
|
||||||
m_slot2On,
|
m_slot2On,
|
||||||
m_tdmaStereo);
|
m_tdmaStereo,
|
||||||
|
ui->symbolPLLLock->isChecked());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -663,10 +675,10 @@ void DSDDemodGUI::tick()
|
|||||||
ui->formatStatusText->setStyleSheet("QLabel { background:rgb(37,53,39); }"); // turn on background
|
ui->formatStatusText->setStyleSheet("QLabel { background:rgb(37,53,39); }"); // turn on background
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_squelchOpen && m_dsdDemod->getDecoder().getSymbolPLLLocked()) {
|
if (m_squelchOpen && ui->symbolPLLLock->isChecked() && m_dsdDemod->getDecoder().getSymbolPLLLocked()) {
|
||||||
ui->symbolPLLLock->setStyleSheet("QToolButton { background-color : green; }");
|
ui->symbolPLLLock->setStyleSheet("QToolButton { background-color : green; }");
|
||||||
} else {
|
} else {
|
||||||
ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(53,53,53); }");
|
ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_tickCount = 0;
|
m_tickCount = 0;
|
||||||
|
@ -74,6 +74,7 @@ private slots:
|
|||||||
void on_squelchGate_valueChanged(int value);
|
void on_squelchGate_valueChanged(int value);
|
||||||
void on_squelch_valueChanged(int value);
|
void on_squelch_valueChanged(int value);
|
||||||
void on_audioMute_toggled(bool checked);
|
void on_audioMute_toggled(bool checked);
|
||||||
|
void on_symbolPLLLock_toggled(bool checked);
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
void onMenuDoubleClicked();
|
void onMenuDoubleClicked();
|
||||||
void tick();
|
void tick();
|
||||||
|
@ -225,17 +225,24 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="symbolPLLLock">
|
<widget class="QToolButton" name="symbolPLLLock">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Symbol PLL lock indicator (green: locked)</string>
|
<string>Symbol PLL toggle (green: PLL locked)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../sdrbase/resources/res.qrc">
|
<iconset resource="../../../sdrbase/resources/res.qrc">
|
||||||
<normaloff>:/locked.png</normaloff>:/locked.png</iconset>
|
<normaloff>:/unlocked.png</normaloff>
|
||||||
|
<normalon>:/locked.png</normalon>:/unlocked.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 354 B |
Loading…
x
Reference in New Issue
Block a user