diff --git a/plugins/channelrx/demoddsd/dsddecoder.h b/plugins/channelrx/demoddsd/dsddecoder.h
index d1fe5667c..566a6e623 100644
--- a/plugins/channelrx/demoddsd/dsddecoder.h
+++ b/plugins/channelrx/demoddsd/dsddecoder.h
@@ -69,6 +69,7 @@ public:
void setMyPoint(float lat, float lon) { m_decoder.setMyPoint(lat, lon); }
void setAudioGain(float gain) { m_decoder.setAudioGain(gain); }
void setBaudRate(int baudRate);
+ void setSymbolPLLLock(bool pllLock) { m_decoder.setSymbolPLLLock(pllLock); }
private:
DSDcc::DSDDecoder m_decoder;
diff --git a/plugins/channelrx/demoddsd/dsddemod.cpp b/plugins/channelrx/demoddsd/dsddemod.cpp
index 2c9926898..e4b19e543 100644
--- a/plugins/channelrx/demoddsd/dsddemod.cpp
+++ b/plugins/channelrx/demoddsd/dsddemod.cpp
@@ -95,7 +95,8 @@ void DSDDemod::configure(MessageQueue* messageQueue,
bool syncOrConstellation,
bool slot1On,
bool slot2On,
- bool tdmaStereo)
+ bool tdmaStereo,
+ bool pllLock)
{
Message* cmd = MsgConfigureDSDDemod::create(rfBandwidth,
demodGain,
@@ -109,7 +110,8 @@ void DSDDemod::configure(MessageQueue* messageQueue,
syncOrConstellation,
slot1On,
slot2On,
- tdmaStereo);
+ tdmaStereo,
+ pllLock);
messageQueue->push(cmd);
}
@@ -363,6 +365,7 @@ bool DSDDemod::handleMessage(const Message& cmd)
m_config.m_slot1On = cfg.getSlot1On();
m_config.m_slot2On = cfg.getSlot2On();
m_config.m_tdmaStereo = cfg.getTDMAStereo();
+ m_config.m_pllLock = cfg.getPLLLock();
apply();
@@ -378,7 +381,8 @@ bool DSDDemod::handleMessage(const Message& cmd)
<< " m_syncOrConstellation: " << m_config.m_syncOrConstellation
<< " m_slot1On: " << m_config.m_slot1On
<< " 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;
}
@@ -451,6 +455,11 @@ void DSDDemod::apply()
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_inputFrequencyOffset = m_config.m_inputFrequencyOffset;
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_slot2On = m_config.m_slot2On;
m_running.m_tdmaStereo = m_config.m_tdmaStereo;
+ m_running.m_pllLock = m_config.m_pllLock;
}
diff --git a/plugins/channelrx/demoddsd/dsddemod.h b/plugins/channelrx/demoddsd/dsddemod.h
index 90a810cbc..62c394e59 100644
--- a/plugins/channelrx/demoddsd/dsddemod.h
+++ b/plugins/channelrx/demoddsd/dsddemod.h
@@ -54,7 +54,8 @@ public:
bool syncOrConstellation,
bool slot1On,
bool slot2On,
- bool tdmaStereo);
+ bool tdmaStereo,
+ bool pllLock);
void configureMyPosition(MessageQueue* messageQueue, float myLatitude, float myLongitude);
@@ -123,6 +124,7 @@ private:
bool getSlot1On() const { return m_slot1On; }
bool getSlot2On() const { return m_slot2On; }
bool getTDMAStereo() const { return m_tdmaStereo; }
+ bool getPLLLock() const { return m_pllLock; }
static MsgConfigureDSDDemod* create(int rfBandwidth,
int demodGain,
@@ -136,7 +138,8 @@ private:
bool syncOrConstellation,
bool slot1On,
bool slot2On,
- bool tdmaStereo)
+ bool tdmaStereo,
+ bool pllLock)
{
return new MsgConfigureDSDDemod(rfBandwidth,
demodGain,
@@ -150,7 +153,8 @@ private:
syncOrConstellation,
slot1On,
slot2On,
- tdmaStereo);
+ tdmaStereo,
+ pllLock);
}
private:
@@ -167,6 +171,7 @@ private:
bool m_slot1On;
bool m_slot2On;
bool m_tdmaStereo;
+ bool m_pllLock;
MsgConfigureDSDDemod(int rfBandwidth,
int demodGain,
@@ -180,7 +185,8 @@ private:
bool syncOrConstellation,
bool slot1On,
bool slot2On,
- bool tdmaStereo) :
+ bool tdmaStereo,
+ bool pllLock) :
Message(),
m_rfBandwidth(rfBandwidth),
m_demodGain(demodGain),
@@ -194,7 +200,8 @@ private:
m_syncOrConstellation(syncOrConstellation),
m_slot1On(slot1On),
m_slot2On(slot2On),
- m_tdmaStereo(tdmaStereo)
+ m_tdmaStereo(tdmaStereo),
+ m_pllLock(pllLock)
{ }
};
@@ -226,6 +233,7 @@ private:
bool m_slot1On;
bool m_slot2On;
bool m_tdmaStereo;
+ bool m_pllLock;
Config() :
m_inputSampleRate(-1),
@@ -243,7 +251,8 @@ private:
m_syncOrConstellation(false),
m_slot1On(false),
m_slot2On(false),
- m_tdmaStereo(false)
+ m_tdmaStereo(false),
+ m_pllLock(true)
{ }
};
diff --git a/plugins/channelrx/demoddsd/dsddemodgui.cpp b/plugins/channelrx/demoddsd/dsddemodgui.cpp
index e81efe8d4..ee16889c6 100644
--- a/plugins/channelrx/demoddsd/dsddemodgui.cpp
+++ b/plugins/channelrx/demoddsd/dsddemodgui.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see . //
///////////////////////////////////////////////////////////////////////////////////
-#include "../../channelrx/demoddsd/dsddemodgui.h"
+#include "dsddemodgui.h"
#include
#include
@@ -23,7 +23,7 @@
#include
#include
-#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
+#include "dsp/threadedbasebandsamplesink.h"
#include "ui_dsddemodgui.h"
#include "dsp/scopevis.h"
#include "gui/glscope.h"
@@ -34,7 +34,7 @@
#include "dsp/dspengine.h"
#include "mainwindow.h"
-#include "../../channelrx/demoddsd/dsddemod.h"
+#include "dsddemod.h"
const QString DSDDemodGUI::m_channelID = "sdrangel.channel.dsddemod";
@@ -86,6 +86,7 @@ void DSDDemodGUI::resetToDefaults()
ui->squelchGate->setValue(5);
ui->squelch->setValue(-40);
ui->deltaFrequency->setValue(0);
+ ui->symbolPLLLock->setChecked(true);
blockApplySettings(false);
applySettings();
@@ -283,6 +284,16 @@ void DSDDemodGUI::on_audioMute_toggled(bool checked)
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)
{
/*
@@ -425,7 +436,8 @@ void DSDDemodGUI::applySettings()
m_syncOrConstellation,
m_slot1On,
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
}
- if (m_squelchOpen && m_dsdDemod->getDecoder().getSymbolPLLLocked()) {
+ if (m_squelchOpen && ui->symbolPLLLock->isChecked() && m_dsdDemod->getDecoder().getSymbolPLLLocked()) {
ui->symbolPLLLock->setStyleSheet("QToolButton { background-color : green; }");
} else {
- ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(53,53,53); }");
+ ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
}
m_tickCount = 0;
diff --git a/plugins/channelrx/demoddsd/dsddemodgui.h b/plugins/channelrx/demoddsd/dsddemodgui.h
index 50a55b76c..d8c935ca5 100644
--- a/plugins/channelrx/demoddsd/dsddemodgui.h
+++ b/plugins/channelrx/demoddsd/dsddemodgui.h
@@ -74,6 +74,7 @@ private slots:
void on_squelchGate_valueChanged(int value);
void on_squelch_valueChanged(int value);
void on_audioMute_toggled(bool checked);
+ void on_symbolPLLLock_toggled(bool checked);
void onWidgetRolled(QWidget* widget, bool rollDown);
void onMenuDoubleClicked();
void tick();
diff --git a/plugins/channelrx/demoddsd/dsddemodgui.ui b/plugins/channelrx/demoddsd/dsddemodgui.ui
index 76fcac249..d9ae695ee 100644
--- a/plugins/channelrx/demoddsd/dsddemodgui.ui
+++ b/plugins/channelrx/demoddsd/dsddemodgui.ui
@@ -225,17 +225,24 @@
-
- false
+ true
- Symbol PLL lock indicator (green: locked)
+ Symbol PLL toggle (green: PLL locked)
...
- :/locked.png:/locked.png
+ :/unlocked.png
+ :/locked.png:/unlocked.png
+
+
+ true
+
+
+ true
diff --git a/sdrbase/resources/unlocked.png b/sdrbase/resources/unlocked.png
index 2f6bbb100..af64a442b 100644
Binary files a/sdrbase/resources/unlocked.png and b/sdrbase/resources/unlocked.png differ