mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-03 13:47:50 -04:00
DSD demod plugin: added button to toggle between transition constellation and symbol synchronization displays
This commit is contained in:
parent
71379c837b
commit
a6782a2780
@ -84,7 +84,8 @@ void DSDDemod::configure(MessageQueue* messageQueue,
|
|||||||
int squelchGate,
|
int squelchGate,
|
||||||
Real squelch,
|
Real squelch,
|
||||||
bool audioMute,
|
bool audioMute,
|
||||||
bool enableCosineFiltering)
|
bool enableCosineFiltering,
|
||||||
|
bool syncOrConstellation)
|
||||||
{
|
{
|
||||||
Message* cmd = MsgConfigureDSDDemod::create(rfBandwidth,
|
Message* cmd = MsgConfigureDSDDemod::create(rfBandwidth,
|
||||||
demodGain,
|
demodGain,
|
||||||
@ -94,7 +95,8 @@ void DSDDemod::configure(MessageQueue* messageQueue,
|
|||||||
squelchGate,
|
squelchGate,
|
||||||
squelch,
|
squelch,
|
||||||
audioMute,
|
audioMute,
|
||||||
enableCosineFiltering);
|
enableCosineFiltering,
|
||||||
|
syncOrConstellation);
|
||||||
messageQueue->push(cmd);
|
messageQueue->push(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,8 +177,16 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
delayedSample = m_sampleBuffer[m_sampleBufferIndex - samplesPerSymbol];
|
delayedSample = m_sampleBuffer[m_sampleBufferIndex - samplesPerSymbol];
|
||||||
}
|
}
|
||||||
|
|
||||||
Sample s(sample, delayedSample); // I=signal, Q=signal delayed by 20 samples (2400 baud: lowest rate)
|
if (m_running.m_syncOrConstellation)
|
||||||
m_scopeSampleBuffer.push_back(s);
|
{
|
||||||
|
Sample s(sample, m_dsdDecoder.getSymbolSyncSample());
|
||||||
|
m_scopeSampleBuffer.push_back(s);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Sample s(sample, delayedSample); // I=signal, Q=signal delayed by 20 samples (2400 baud: lowest rate)
|
||||||
|
m_scopeSampleBuffer.push_back(s);
|
||||||
|
}
|
||||||
|
|
||||||
if (DSPEngine::instance()->hasDVSerialSupport() && m_dsdDecoder.mbeDVReady())
|
if (DSPEngine::instance()->hasDVSerialSupport() && m_dsdDecoder.mbeDVReady())
|
||||||
{
|
{
|
||||||
@ -255,6 +265,7 @@ bool DSDDemod::handleMessage(const Message& cmd)
|
|||||||
m_config.m_squelch = cfg.getSquelch();
|
m_config.m_squelch = cfg.getSquelch();
|
||||||
m_config.m_audioMute = cfg.getAudioMute();
|
m_config.m_audioMute = cfg.getAudioMute();
|
||||||
m_config.m_enableCosineFiltering = cfg.getEnableCosineFiltering();
|
m_config.m_enableCosineFiltering = cfg.getEnableCosineFiltering();
|
||||||
|
m_config.m_syncOrConstellation = cfg.getSyncOrConstellation();
|
||||||
|
|
||||||
apply();
|
apply();
|
||||||
|
|
||||||
@ -266,7 +277,8 @@ bool DSDDemod::handleMessage(const Message& cmd)
|
|||||||
<< " m_squelchGate" << m_config.m_squelchGate
|
<< " m_squelchGate" << m_config.m_squelchGate
|
||||||
<< " m_squelch: " << m_config.m_squelch
|
<< " m_squelch: " << m_config.m_squelch
|
||||||
<< " m_audioMute: " << m_config.m_audioMute
|
<< " m_audioMute: " << m_config.m_audioMute
|
||||||
<< " m_enableCosineFiltering: " << m_config.m_enableCosineFiltering;
|
<< " m_enableCosineFiltering: " << m_config.m_enableCosineFiltering
|
||||||
|
<< " m_syncOrConstellation: " << m_config.m_syncOrConstellation;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -340,4 +352,5 @@ void DSDDemod::apply()
|
|||||||
m_running.m_audioSampleRate = m_config.m_audioSampleRate;
|
m_running.m_audioSampleRate = m_config.m_audioSampleRate;
|
||||||
m_running.m_audioMute = m_config.m_audioMute;
|
m_running.m_audioMute = m_config.m_audioMute;
|
||||||
m_running.m_enableCosineFiltering = m_config.m_enableCosineFiltering;
|
m_running.m_enableCosineFiltering = m_config.m_enableCosineFiltering;
|
||||||
|
m_running.m_syncOrConstellation = m_config.m_syncOrConstellation;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,8 @@ public:
|
|||||||
int squelchGate,
|
int squelchGate,
|
||||||
Real squelch,
|
Real squelch,
|
||||||
bool audioMute,
|
bool audioMute,
|
||||||
bool enableCosineFiltering);
|
bool enableCosineFiltering,
|
||||||
|
bool syncOrConstellation);
|
||||||
|
|
||||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||||
virtual void start();
|
virtual void start();
|
||||||
@ -79,6 +80,7 @@ private:
|
|||||||
Real getSquelch() const { return m_squelch; }
|
Real getSquelch() const { return m_squelch; }
|
||||||
bool getAudioMute() const { return m_audioMute; }
|
bool getAudioMute() const { return m_audioMute; }
|
||||||
bool getEnableCosineFiltering() const { return m_enableCosineFiltering; }
|
bool getEnableCosineFiltering() const { return m_enableCosineFiltering; }
|
||||||
|
bool getSyncOrConstellation() const { return m_syncOrConstellation; }
|
||||||
|
|
||||||
static MsgConfigureDSDDemod* create(int rfBandwidth,
|
static MsgConfigureDSDDemod* create(int rfBandwidth,
|
||||||
int demodGain,
|
int demodGain,
|
||||||
@ -88,9 +90,19 @@ private:
|
|||||||
int squelchGate,
|
int squelchGate,
|
||||||
Real squelch,
|
Real squelch,
|
||||||
bool audioMute,
|
bool audioMute,
|
||||||
bool enableCosineFiltering)
|
bool enableCosineFiltering,
|
||||||
|
bool syncOrConstellation)
|
||||||
{
|
{
|
||||||
return new MsgConfigureDSDDemod(rfBandwidth, demodGain, fmDeviation, volume, baudRate, squelchGate, squelch, audioMute, enableCosineFiltering);
|
return new MsgConfigureDSDDemod(rfBandwidth,
|
||||||
|
demodGain,
|
||||||
|
fmDeviation,
|
||||||
|
volume,
|
||||||
|
baudRate,
|
||||||
|
squelchGate,
|
||||||
|
squelch,
|
||||||
|
audioMute,
|
||||||
|
enableCosineFiltering,
|
||||||
|
syncOrConstellation);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -103,6 +115,7 @@ private:
|
|||||||
Real m_squelch;
|
Real m_squelch;
|
||||||
bool m_audioMute;
|
bool m_audioMute;
|
||||||
bool m_enableCosineFiltering;
|
bool m_enableCosineFiltering;
|
||||||
|
bool m_syncOrConstellation;
|
||||||
|
|
||||||
MsgConfigureDSDDemod(int rfBandwidth,
|
MsgConfigureDSDDemod(int rfBandwidth,
|
||||||
int demodGain,
|
int demodGain,
|
||||||
@ -112,7 +125,8 @@ private:
|
|||||||
int squelchGate,
|
int squelchGate,
|
||||||
Real squelch,
|
Real squelch,
|
||||||
bool audioMute,
|
bool audioMute,
|
||||||
bool enableCosineFiltering) :
|
bool enableCosineFiltering,
|
||||||
|
bool syncOrConstellation) :
|
||||||
Message(),
|
Message(),
|
||||||
m_rfBandwidth(rfBandwidth),
|
m_rfBandwidth(rfBandwidth),
|
||||||
m_demodGain(demodGain),
|
m_demodGain(demodGain),
|
||||||
@ -122,7 +136,8 @@ private:
|
|||||||
m_squelchGate(squelchGate),
|
m_squelchGate(squelchGate),
|
||||||
m_squelch(squelch),
|
m_squelch(squelch),
|
||||||
m_audioMute(audioMute),
|
m_audioMute(audioMute),
|
||||||
m_enableCosineFiltering(enableCosineFiltering)
|
m_enableCosineFiltering(enableCosineFiltering),
|
||||||
|
m_syncOrConstellation(syncOrConstellation)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -150,6 +165,7 @@ private:
|
|||||||
bool m_audioMute;
|
bool m_audioMute;
|
||||||
quint32 m_audioSampleRate;
|
quint32 m_audioSampleRate;
|
||||||
bool m_enableCosineFiltering;
|
bool m_enableCosineFiltering;
|
||||||
|
bool m_syncOrConstellation;
|
||||||
|
|
||||||
Config() :
|
Config() :
|
||||||
m_inputSampleRate(-1),
|
m_inputSampleRate(-1),
|
||||||
@ -163,7 +179,8 @@ private:
|
|||||||
m_squelch(0),
|
m_squelch(0),
|
||||||
m_audioMute(false),
|
m_audioMute(false),
|
||||||
m_audioSampleRate(0),
|
m_audioSampleRate(0),
|
||||||
m_enableCosineFiltering(false)
|
m_enableCosineFiltering(false),
|
||||||
|
m_syncOrConstellation(false)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -115,6 +115,7 @@ QByteArray DSDDemodGUI::serialize() const
|
|||||||
s.writeBlob(10, ui->scopeGUI->serialize());
|
s.writeBlob(10, ui->scopeGUI->serialize());
|
||||||
s.writeS32(11, ui->baudRate->currentIndex());
|
s.writeS32(11, ui->baudRate->currentIndex());
|
||||||
s.writeBool(12, m_enableCosineFiltering);
|
s.writeBool(12, m_enableCosineFiltering);
|
||||||
|
s.writeBool(13, m_syncOrConstellation);
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,6 +164,7 @@ bool DSDDemodGUI::deserialize(const QByteArray& data)
|
|||||||
d.readS32(11, &tmp, 20);
|
d.readS32(11, &tmp, 20);
|
||||||
ui->baudRate->setCurrentIndex(tmp);
|
ui->baudRate->setCurrentIndex(tmp);
|
||||||
d.readBool(12, &m_enableCosineFiltering, false);
|
d.readBool(12, &m_enableCosineFiltering, false);
|
||||||
|
d.readBool(13, &m_syncOrConstellation, false);
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
m_channelMarker.blockSignals(false);
|
m_channelMarker.blockSignals(false);
|
||||||
@ -243,6 +245,12 @@ void DSDDemodGUI::on_enableCosineFiltering_toggled(bool enable)
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DSDDemodGUI::on_syncOrConstellation_toggled(bool checked)
|
||||||
|
{
|
||||||
|
m_syncOrConstellation = checked;
|
||||||
|
applySettings();
|
||||||
|
}
|
||||||
|
|
||||||
void DSDDemodGUI::on_squelchGate_valueChanged(int value)
|
void DSDDemodGUI::on_squelchGate_valueChanged(int value)
|
||||||
{
|
{
|
||||||
applySettings();
|
applySettings();
|
||||||
@ -288,6 +296,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_signalFormat(signalFormatNone),
|
m_signalFormat(signalFormatNone),
|
||||||
m_enableCosineFiltering(false),
|
m_enableCosineFiltering(false),
|
||||||
|
m_syncOrConstellation(false),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false),
|
||||||
m_channelPowerDbAvg(20,0),
|
m_channelPowerDbAvg(20,0),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
@ -363,8 +372,7 @@ void DSDDemodGUI::applySettings()
|
|||||||
ui->squelchGateText->setText(QString("%1").arg(ui->squelchGate->value() * 10.0, 0, 'f', 0));
|
ui->squelchGateText->setText(QString("%1").arg(ui->squelchGate->value() * 10.0, 0, 'f', 0));
|
||||||
ui->volumeText->setText(QString("%1").arg(ui->volume->value() / 10.0, 0, 'f', 1));
|
ui->volumeText->setText(QString("%1").arg(ui->volume->value() / 10.0, 0, 'f', 1));
|
||||||
ui->enableCosineFiltering->setChecked(m_enableCosineFiltering);
|
ui->enableCosineFiltering->setChecked(m_enableCosineFiltering);
|
||||||
|
ui->syncOrConstellation->setChecked(m_syncOrConstellation);
|
||||||
// TODO: pass m_enableCosineFiltering
|
|
||||||
|
|
||||||
m_dsdDemod->configure(m_dsdDemod->getInputMessageQueue(),
|
m_dsdDemod->configure(m_dsdDemod->getInputMessageQueue(),
|
||||||
ui->rfBW->value(),
|
ui->rfBW->value(),
|
||||||
@ -375,7 +383,8 @@ void DSDDemodGUI::applySettings()
|
|||||||
ui->squelchGate->value(), // in 10ths of ms
|
ui->squelchGate->value(), // in 10ths of ms
|
||||||
ui->squelch->value(),
|
ui->squelch->value(),
|
||||||
ui->audioMute->isChecked(),
|
ui->audioMute->isChecked(),
|
||||||
m_enableCosineFiltering);
|
m_enableCosineFiltering,
|
||||||
|
m_syncOrConstellation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ private slots:
|
|||||||
void on_volume_valueChanged(int value);
|
void on_volume_valueChanged(int value);
|
||||||
void on_baudRate_currentIndexChanged(int index);
|
void on_baudRate_currentIndexChanged(int index);
|
||||||
void on_enableCosineFiltering_toggled(bool enable);
|
void on_enableCosineFiltering_toggled(bool enable);
|
||||||
|
void on_syncOrConstellation_toggled(bool checked);
|
||||||
void on_fmDeviation_valueChanged(int value);
|
void on_fmDeviation_valueChanged(int value);
|
||||||
void on_squelchGate_valueChanged(int value);
|
void on_squelchGate_valueChanged(int value);
|
||||||
void on_squelch_valueChanged(int value);
|
void on_squelch_valueChanged(int value);
|
||||||
@ -98,6 +99,7 @@ private:
|
|||||||
|
|
||||||
DSDDemod* m_dsdDemod;
|
DSDDemod* m_dsdDemod;
|
||||||
bool m_enableCosineFiltering;
|
bool m_enableCosineFiltering;
|
||||||
|
bool m_syncOrConstellation;
|
||||||
bool m_audioMute;
|
bool m_audioMute;
|
||||||
bool m_squelchOpen;
|
bool m_squelchOpen;
|
||||||
MovingAverage<Real> m_channelPowerDbAvg;
|
MovingAverage<Real> m_channelPowerDbAvg;
|
||||||
|
@ -59,16 +59,7 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -210,7 +201,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Symbol synchronization quality (%)</string>
|
<string>Symbol synchronization rate (%)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>00</string>
|
<string>00</string>
|
||||||
@ -253,6 +244,24 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="syncOrConstellation">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Toggle between transition constellation and symbol synchronization displays</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../sdrbase/resources/res.qrc">
|
||||||
|
<normaloff>:/constellation.png</normaloff>
|
||||||
|
<normalon>:/slopep_icon.png</normalon>:/constellation.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="inCarrierPosText">
|
<widget class="QLabel" name="inCarrierPosText">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -775,16 +784,7 @@
|
|||||||
<string>Discriminator Scope</string>
|
<string>Discriminator Scope</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="scopeContainer">
|
<layout class="QVBoxLayout" name="scopeContainer">
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
BIN
sdrbase/resources/constellation.png
Normal file
BIN
sdrbase/resources/constellation.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 838 B |
@ -57,5 +57,6 @@
|
|||||||
<file>rds.png</file>
|
<file>rds.png</file>
|
||||||
<file>recycle.png</file>
|
<file>recycle.png</file>
|
||||||
<file>lsb.png</file>
|
<file>lsb.png</file>
|
||||||
|
<file>constellation.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user