mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-05-26 18:16:52 -04:00
Merge pull request #2591 from f4exb/fix-2412
BFM Demodulator enhancements and fixes. Fix 2412, 2413 and 2374
This commit is contained in:
commit
71fc02f0f8
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 76 KiB |
Binary file not shown.
@ -217,6 +217,7 @@ void BFMDemod::applySettings(const BFMDemodSettings& settings, bool force)
|
||||
<< " m_inputFrequencyOffset: " << settings.m_inputFrequencyOffset
|
||||
<< " m_rfBandwidth: " << settings.m_rfBandwidth
|
||||
<< " m_afBandwidth: " << settings.m_afBandwidth
|
||||
<< " m_deEmphasis: " << settings.getDeEmphasisTimeConstant()
|
||||
<< " m_volume: " << settings.m_volume
|
||||
<< " m_squelch: " << settings.m_squelch
|
||||
<< " m_audioStereo: " << settings.m_audioStereo
|
||||
@ -236,6 +237,9 @@ void BFMDemod::applySettings(const BFMDemodSettings& settings, bool force)
|
||||
if ((settings.m_volume != m_settings.m_volume) || force) {
|
||||
reverseAPIKeys.append("volume");
|
||||
}
|
||||
if ((settings.m_audioMute != m_settings.m_audioMute) || force) {
|
||||
reverseAPIKeys.append("audioMute");
|
||||
}
|
||||
if ((settings.m_audioStereo != m_settings.m_audioStereo) || force) {
|
||||
reverseAPIKeys.append("audioStereo");
|
||||
}
|
||||
@ -254,6 +258,9 @@ void BFMDemod::applySettings(const BFMDemodSettings& settings, bool force)
|
||||
if ((settings.m_rfBandwidth != m_settings.m_rfBandwidth) || force) {
|
||||
reverseAPIKeys.append("rfBandwidth");
|
||||
}
|
||||
if ((settings.m_deEmphasis != m_settings.m_deEmphasis) || force) {
|
||||
reverseAPIKeys.append("deEmphasis");
|
||||
}
|
||||
if ((settings.m_squelch != m_settings.m_squelch) || force) {
|
||||
reverseAPIKeys.append("squelch");
|
||||
}
|
||||
@ -383,12 +390,22 @@ void BFMDemod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("afBandwidth")) {
|
||||
settings.m_afBandwidth = response.getBfmDemodSettings()->getAfBandwidth();
|
||||
}
|
||||
if (channelSettingsKeys.contains("deEmphasis"))
|
||||
{
|
||||
int deEmphasis = response.getBfmDemodSettings()->getDeEmphasis();
|
||||
if (deEmphasis >= 0 && deEmphasis < 2) {
|
||||
settings.m_deEmphasis = static_cast<BFMDemodSettings::DeEmphasis>(deEmphasis);
|
||||
}
|
||||
}
|
||||
if (channelSettingsKeys.contains("volume")) {
|
||||
settings.m_volume = response.getBfmDemodSettings()->getVolume();
|
||||
}
|
||||
if (channelSettingsKeys.contains("squelch")) {
|
||||
settings.m_squelch = response.getBfmDemodSettings()->getSquelch();
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioMute")) {
|
||||
settings.m_audioMute = response.getBfmDemodSettings()->getAudioMute() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioStereo")) {
|
||||
settings.m_audioStereo = response.getBfmDemodSettings()->getAudioStereo() != 0;
|
||||
}
|
||||
@ -455,8 +472,10 @@ void BFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
|
||||
response.getBfmDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||
response.getBfmDemodSettings()->setRfBandwidth(settings.m_rfBandwidth);
|
||||
response.getBfmDemodSettings()->setAfBandwidth(settings.m_afBandwidth);
|
||||
response.getBfmDemodSettings()->setDeEmphasis(static_cast<int>(settings.m_deEmphasis));
|
||||
response.getBfmDemodSettings()->setVolume(settings.m_volume);
|
||||
response.getBfmDemodSettings()->setSquelch(settings.m_squelch);
|
||||
response.getBfmDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
|
||||
response.getBfmDemodSettings()->setAudioStereo(settings.m_audioStereo ? 1 : 0);
|
||||
response.getBfmDemodSettings()->setLsbStereo(settings.m_lsbStereo ? 1 : 0);
|
||||
response.getBfmDemodSettings()->setShowPilot(settings.m_showPilot ? 1 : 0);
|
||||
@ -665,12 +684,18 @@ void BFMDemod::webapiFormatChannelSettings(
|
||||
if (channelSettingsKeys.contains("afBandwidth") || force) {
|
||||
swgBFMDemodSettings->setAfBandwidth(settings.m_afBandwidth);
|
||||
}
|
||||
if (channelSettingsKeys.contains("deEmphasis") || force) {
|
||||
swgBFMDemodSettings->setDeEmphasis(static_cast<int>(settings.m_deEmphasis));
|
||||
}
|
||||
if (channelSettingsKeys.contains("volume") || force) {
|
||||
swgBFMDemodSettings->setVolume(settings.m_volume);
|
||||
}
|
||||
if (channelSettingsKeys.contains("squelch") || force) {
|
||||
swgBFMDemodSettings->setSquelch(settings.m_squelch);
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioMute") || force) {
|
||||
swgBFMDemodSettings->setAudioMute(settings.m_audioMute ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioStereo") || force) {
|
||||
swgBFMDemodSettings->setAudioStereo(settings.m_audioStereo ? 1 : 0);
|
||||
}
|
||||
|
||||
@ -179,6 +179,12 @@ void BFMDemodGUI::on_afBW_valueChanged(int value)
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void BFMDemodGUI::on_deEmphasis_currentIndexChanged(int index)
|
||||
{
|
||||
m_settings.m_deEmphasis = static_cast<BFMDemodSettings::DeEmphasis>(index);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void BFMDemodGUI::on_volume_valueChanged(int value)
|
||||
{
|
||||
ui->volumeText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
|
||||
@ -193,6 +199,12 @@ void BFMDemodGUI::on_squelch_valueChanged(int value)
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void BFMDemodGUI::on_audioMute_toggled(bool mute)
|
||||
{
|
||||
m_settings.m_audioMute = mute;
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void BFMDemodGUI::on_audioStereo_toggled(bool stereo)
|
||||
{
|
||||
if (!stereo)
|
||||
@ -512,6 +524,7 @@ void BFMDemodGUI::displaySettings()
|
||||
ui->squelch->setValue(m_settings.m_squelch);
|
||||
ui->squelchText->setText(QString("%1 dB").arg(m_settings.m_squelch));
|
||||
|
||||
ui->audioMute->setChecked(m_settings.m_audioMute);
|
||||
ui->audioStereo->setChecked(m_settings.m_audioStereo);
|
||||
ui->lsbStereo->setChecked(m_settings.m_lsbStereo);
|
||||
ui->showPilot->setChecked(m_settings.m_showPilot);
|
||||
@ -879,8 +892,10 @@ void BFMDemodGUI::makeUIConnections()
|
||||
QObject::connect(ui->deltaFrequency, &ValueDialZ::changed, this, &BFMDemodGUI::on_deltaFrequency_changed);
|
||||
QObject::connect(ui->rfBW, &QSlider::valueChanged, this, &BFMDemodGUI::on_rfBW_valueChanged);
|
||||
QObject::connect(ui->afBW, &QSlider::valueChanged, this, &BFMDemodGUI::on_afBW_valueChanged);
|
||||
QObject::connect(ui->deEmphasis, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &BFMDemodGUI::on_deEmphasis_currentIndexChanged);
|
||||
QObject::connect(ui->volume, &QSlider::valueChanged, this, &BFMDemodGUI::on_volume_valueChanged);
|
||||
QObject::connect(ui->squelch, &QSlider::valueChanged, this, &BFMDemodGUI::on_squelch_valueChanged);
|
||||
QObject::connect(ui->audioMute, &QToolButton::toggled, this, &BFMDemodGUI::on_audioMute_toggled);
|
||||
QObject::connect(ui->audioStereo, &QToolButton::toggled, this, &BFMDemodGUI::on_audioStereo_toggled);
|
||||
QObject::connect(ui->lsbStereo, &ButtonSwitch::toggled, this, &BFMDemodGUI::on_lsbStereo_toggled);
|
||||
QObject::connect(ui->showPilot, &ButtonSwitch::clicked, this, &BFMDemodGUI::on_showPilot_clicked);
|
||||
|
||||
@ -108,8 +108,10 @@ private slots:
|
||||
void on_deltaFrequency_changed(qint64 value);
|
||||
void on_rfBW_valueChanged(int value);
|
||||
void on_afBW_valueChanged(int value);
|
||||
void on_deEmphasis_currentIndexChanged(int index);
|
||||
void on_volume_valueChanged(int value);
|
||||
void on_squelch_valueChanged(int value);
|
||||
void on_audioMute_toggled(bool mute);
|
||||
void on_audioStereo_toggled(bool stereo);
|
||||
void on_lsbStereo_toggled(bool lsb);
|
||||
void on_showPilot_clicked();
|
||||
|
||||
@ -267,6 +267,24 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="audioMute">
|
||||
<property name="toolTip">
|
||||
<string>Mute/Unmute audio</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../sdrgui/resources/res.qrc">
|
||||
<normaloff>:/sound_on.png</normaloff>
|
||||
<normalon>:/sound_off.png</normalon>:/sound_on.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -400,6 +418,37 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="deEmphasisLabel">
|
||||
<property name="text">
|
||||
<string>De-emph</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="deEmphasis">
|
||||
<property name="toolTip">
|
||||
<string>De-emphasis time constant</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>50us</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>75us</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
@ -1883,11 +1932,6 @@
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RollupContents</class>
|
||||
<extends>QWidget</extends>
|
||||
@ -1900,6 +1944,11 @@
|
||||
<header>gui/valuedialz.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LevelMeterSignalDB</class>
|
||||
<extends>QWidget</extends>
|
||||
|
||||
@ -46,10 +46,12 @@ void BFMDemodSettings::resetToDefaults()
|
||||
m_afBandwidth = 15000;
|
||||
m_volume = 2.0;
|
||||
m_squelch = -60.0;
|
||||
m_audioMute = false;
|
||||
m_audioStereo = false;
|
||||
m_lsbStereo = false;
|
||||
m_showPilot = false;
|
||||
m_rdsActive = false;
|
||||
m_deEmphasis = DeEmphasis50us;
|
||||
m_rgbColor = QColor(80, 120, 228).rgb();
|
||||
m_title = "Broadcast FM Demod";
|
||||
m_audioDeviceName = AudioDeviceManager::m_defaultDeviceName;
|
||||
@ -101,6 +103,8 @@ QByteArray BFMDemodSettings::serialize() const
|
||||
s.writeS32(22, m_workspaceIndex);
|
||||
s.writeBlob(23, m_geometryBytes);
|
||||
s.writeBool(24, m_hidden);
|
||||
s.writeBool(25, m_audioMute);
|
||||
s.writeS32(26, m_deEmphasis);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -178,6 +182,9 @@ bool BFMDemodSettings::deserialize(const QByteArray& data)
|
||||
d.readS32(22, &m_workspaceIndex, 0);
|
||||
d.readBlob(23, &m_geometryBytes);
|
||||
d.readBool(24, &m_hidden, false);
|
||||
d.readBool(25, &m_audioMute, false);
|
||||
d.readS32(26, &tmp, DeEmphasis50us);
|
||||
m_deEmphasis = static_cast<DeEmphasis>(tmp);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -27,15 +27,23 @@ class Serializable;
|
||||
|
||||
struct BFMDemodSettings
|
||||
{
|
||||
enum DeEmphasis
|
||||
{
|
||||
DeEmphasis50us,
|
||||
DeEmphasis75us,
|
||||
};
|
||||
|
||||
qint64 m_inputFrequencyOffset;
|
||||
Real m_rfBandwidth;
|
||||
Real m_afBandwidth;
|
||||
Real m_volume;
|
||||
Real m_squelch;
|
||||
bool m_audioMute;
|
||||
bool m_audioStereo;
|
||||
bool m_lsbStereo;
|
||||
bool m_showPilot;
|
||||
bool m_rdsActive;
|
||||
DeEmphasis m_deEmphasis;
|
||||
quint32 m_rgbColor;
|
||||
QString m_title;
|
||||
QString m_audioDeviceName;
|
||||
@ -75,6 +83,19 @@ struct BFMDemodSettings
|
||||
return (3*rfBW)/2;
|
||||
}
|
||||
}
|
||||
|
||||
double getDeEmphasisTimeConstant() const
|
||||
{
|
||||
switch (m_deEmphasis)
|
||||
{
|
||||
case DeEmphasis50us:
|
||||
return 50e-6;
|
||||
case DeEmphasis75us:
|
||||
return 75e-6;
|
||||
default:
|
||||
return 50e-6;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
#include "rdsparser.h"
|
||||
#include "bfmdemodsink.h"
|
||||
|
||||
const Real BFMDemodSink::default_deemphasis = 50.0; // 50 us
|
||||
const int BFMDemodSink::default_excursion = 750000; // +/- 75 kHz
|
||||
|
||||
BFMDemodSink::BFMDemodSink() :
|
||||
@ -41,8 +40,8 @@ BFMDemodSink::BFMDemodSink() :
|
||||
m_audioBufferFill(0),
|
||||
m_audioFifo(48000),
|
||||
m_pilotPLL(19000/384000, 50/384000, 0.01),
|
||||
m_deemphasisFilterX(default_deemphasis * 48000 * 1.0e-6),
|
||||
m_deemphasisFilterY(default_deemphasis * 48000 * 1.0e-6),
|
||||
m_deemphasisFilterX(m_settings.getDeEmphasisTimeConstant() * 48000),
|
||||
m_deemphasisFilterY(m_settings.getDeEmphasisTimeConstant() * 48000),
|
||||
m_fmExcursion(default_excursion)
|
||||
{
|
||||
m_magsq = 0.0f;
|
||||
@ -67,8 +66,8 @@ BFMDemodSink::BFMDemodSink() :
|
||||
|
||||
m_rfFilter = new fftfilt(-50000.0 / 384000.0, 50000.0 / 384000.0, filtFftLen);
|
||||
|
||||
m_deemphasisFilterX.configure(default_deemphasis * m_audioSampleRate * 1.0e-6);
|
||||
m_deemphasisFilterY.configure(default_deemphasis * m_audioSampleRate * 1.0e-6);
|
||||
m_deemphasisFilterX.configure(m_settings.getDeEmphasisTimeConstant() * m_audioSampleRate);
|
||||
m_deemphasisFilterY.configure(m_settings.getDeEmphasisTimeConstant() * m_audioSampleRate);
|
||||
m_phaseDiscri.setFMScaling(384000/m_fmExcursion);
|
||||
|
||||
m_audioBuffer.resize(1<<14);
|
||||
@ -96,6 +95,10 @@ void BFMDemodSink::feed(const SampleVector::const_iterator& begin, const SampleV
|
||||
|
||||
m_sampleBuffer.clear();
|
||||
|
||||
if (m_settings.m_audioMute) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (SampleVector::const_iterator it = begin; it != end; ++it)
|
||||
{
|
||||
Complex c(it->real() / SDR_RX_SCALEF, it->imag() / SDR_RX_SCALEF);
|
||||
@ -283,8 +286,8 @@ void BFMDemodSink::applyAudioSampleRate(int sampleRate)
|
||||
m_interpolatorStereoDistanceRemain = (Real) m_channelSampleRate / sampleRate;
|
||||
m_interpolatorStereoDistance = (Real) m_channelSampleRate / (Real) sampleRate;
|
||||
|
||||
m_deemphasisFilterX.configure(default_deemphasis * sampleRate * 1.0e-6);
|
||||
m_deemphasisFilterY.configure(default_deemphasis * sampleRate * 1.0e-6);
|
||||
m_deemphasisFilterX.configure(m_settings.getDeEmphasisTimeConstant() * sampleRate);
|
||||
m_deemphasisFilterY.configure(m_settings.getDeEmphasisTimeConstant() * sampleRate);
|
||||
|
||||
m_audioSampleRate = sampleRate;
|
||||
}
|
||||
@ -333,6 +336,7 @@ void BFMDemodSink::applySettings(const BFMDemodSettings& settings, bool force)
|
||||
<< " m_inputFrequencyOffset: " << settings.m_inputFrequencyOffset
|
||||
<< " m_rfBandwidth: " << settings.m_rfBandwidth
|
||||
<< " m_afBandwidth: " << settings.m_afBandwidth
|
||||
<< " m_deEmphasis: " << settings.getDeEmphasisTimeConstant()
|
||||
<< " m_volume: " << settings.m_volume
|
||||
<< " m_squelch: " << settings.m_squelch
|
||||
<< " m_audioStereo: " << settings.m_audioStereo
|
||||
@ -344,8 +348,16 @@ void BFMDemodSink::applySettings(const BFMDemodSettings& settings, bool force)
|
||||
<< " m_useReverseAPI: " << settings.m_useReverseAPI
|
||||
<< " force: " << force;
|
||||
|
||||
if ((settings.m_audioStereo && (settings.m_audioStereo != m_settings.m_audioStereo)) || force) {
|
||||
if ((settings.m_audioStereo && (settings.m_audioStereo != m_settings.m_audioStereo)) || force)
|
||||
{
|
||||
m_pilotPLL.configure(19000.0/m_channelSampleRate, 50.0/m_channelSampleRate, 0.01);
|
||||
applyAudioSampleRate(m_audioSampleRate); // re-apply audio sample rate to reconfigure interpolators
|
||||
}
|
||||
|
||||
if ((settings.getDeEmphasisTimeConstant() != m_settings.getDeEmphasisTimeConstant()) || force)
|
||||
{
|
||||
m_deemphasisFilterX.configure(settings.getDeEmphasisTimeConstant() * m_audioSampleRate);
|
||||
m_deemphasisFilterY.configure(settings.getDeEmphasisTimeConstant() * m_audioSampleRate);
|
||||
}
|
||||
|
||||
if ((settings.m_afBandwidth != m_settings.m_afBandwidth) || force)
|
||||
|
||||
@ -155,7 +155,6 @@ private:
|
||||
|
||||
LowPassFilterRC m_deemphasisFilterX;
|
||||
LowPassFilterRC m_deemphasisFilterY;
|
||||
static const Real default_deemphasis;
|
||||
|
||||
Real m_fmExcursion;
|
||||
static const int default_excursion;
|
||||
|
||||
@ -48,25 +48,36 @@ This is the power of the reconstructed stereo pilot signal.
|
||||
|
||||
Use this button to activate or de-activate RDS decoding
|
||||
|
||||
<h3>A.8: Level meter in dB</h3>
|
||||
<h3>A.8: Audio mute</h3>
|
||||
|
||||
Use this button to mute or unmute audio
|
||||
|
||||
<h3>A.9: Level meter in dB</h3>
|
||||
|
||||
- top bar (green): average value
|
||||
- bottom bar (blue green): instantaneous peak value
|
||||
- tip vertical bar (bright green): peak hold value
|
||||
|
||||
<h3>A.9: RF Bandwidth</h3>
|
||||
<h3>A.10: RF Bandwidth</h3>
|
||||
|
||||
This is the bandwidth in kHz of the channel signal before demodulation. It can be set in steps: 80, 100, 120, 140, 160, 180, 200, 220 and 250 kHz. Inspect the baseband spectrum (B) to adjust for best quality.
|
||||
|
||||
<h3>A.10: AF bandwidth</h3>
|
||||
<h3>A.11: AF bandwidth</h3>
|
||||
|
||||
This is the AF bandwidth in kHz. It can be varied continuously between 1 and 20 kHz in steps of 1 kHz.
|
||||
|
||||
<h3>A.11: AF volume</h3>
|
||||
<h3>A.12: De-emphasis</h3>
|
||||
|
||||
Select the de-emphasis time constant:
|
||||
|
||||
- **50us**: for Europe, Australia...
|
||||
- **75us**: for North America, Japan...
|
||||
|
||||
<h3>A.13: AF volume</h3>
|
||||
|
||||
This is the relative AF volume from 0 to 10.
|
||||
|
||||
<h3>A.12: Squelch</h3>
|
||||
<h3>A.14: Squelch</h3>
|
||||
|
||||
Adjust squelch in dB.
|
||||
|
||||
|
||||
@ -2948,6 +2948,10 @@ margin-bottom: 20px;
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"deEmphasis" : {
|
||||
"type" : "integer",
|
||||
"description" : "De-emphasis time constant (us)\n * 0 - 50us (Europe, Australia)\n * 1 - 75us (US, Japan)\n"
|
||||
},
|
||||
"volume" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
@ -2956,6 +2960,9 @@ margin-bottom: 20px;
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"audioMute" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"audioStereo" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
@ -59647,7 +59654,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2026-01-03T10:36:00.091+01:00
|
||||
Generated 2026-01-04T00:29:36.688+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -10,12 +10,20 @@ BFMDemodSettings:
|
||||
afBandwidth:
|
||||
type: number
|
||||
format: float
|
||||
deEmphasis:
|
||||
type: integer
|
||||
description: >
|
||||
De-emphasis time constant (us)
|
||||
* 0 - 50us (Europe, Australia)
|
||||
* 1 - 75us (US, Japan)
|
||||
volume:
|
||||
type: number
|
||||
format: float
|
||||
squelch:
|
||||
type: number
|
||||
format: float
|
||||
audioMute:
|
||||
type: integer
|
||||
audioStereo:
|
||||
type: integer
|
||||
lsbStereo:
|
||||
|
||||
@ -10,12 +10,20 @@ BFMDemodSettings:
|
||||
afBandwidth:
|
||||
type: number
|
||||
format: float
|
||||
deEmphasis:
|
||||
type: integer
|
||||
description: >
|
||||
De-emphasis time constant (us)
|
||||
* 0 - 50us (Europe, Australia)
|
||||
* 1 - 75us (US, Japan)
|
||||
volume:
|
||||
type: number
|
||||
format: float
|
||||
squelch:
|
||||
type: number
|
||||
format: float
|
||||
audioMute:
|
||||
type: integer
|
||||
audioStereo:
|
||||
type: integer
|
||||
lsbStereo:
|
||||
|
||||
@ -2948,6 +2948,10 @@ margin-bottom: 20px;
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"deEmphasis" : {
|
||||
"type" : "integer",
|
||||
"description" : "De-emphasis time constant (us)\n * 0 - 50us (Europe, Australia)\n * 1 - 75us (US, Japan)\n"
|
||||
},
|
||||
"volume" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
@ -2956,6 +2960,9 @@ margin-bottom: 20px;
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"audioMute" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"audioStereo" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
@ -59647,7 +59654,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2026-01-03T10:36:00.091+01:00
|
||||
Generated 2026-01-04T00:29:36.688+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -34,10 +34,14 @@ SWGBFMDemodSettings::SWGBFMDemodSettings() {
|
||||
m_rf_bandwidth_isSet = false;
|
||||
af_bandwidth = 0.0f;
|
||||
m_af_bandwidth_isSet = false;
|
||||
de_emphasis = 0;
|
||||
m_de_emphasis_isSet = false;
|
||||
volume = 0.0f;
|
||||
m_volume_isSet = false;
|
||||
squelch = 0.0f;
|
||||
m_squelch_isSet = false;
|
||||
audio_mute = 0;
|
||||
m_audio_mute_isSet = false;
|
||||
audio_stereo = 0;
|
||||
m_audio_stereo_isSet = false;
|
||||
lsb_stereo = 0;
|
||||
@ -84,10 +88,14 @@ SWGBFMDemodSettings::init() {
|
||||
m_rf_bandwidth_isSet = false;
|
||||
af_bandwidth = 0.0f;
|
||||
m_af_bandwidth_isSet = false;
|
||||
de_emphasis = 0;
|
||||
m_de_emphasis_isSet = false;
|
||||
volume = 0.0f;
|
||||
m_volume_isSet = false;
|
||||
squelch = 0.0f;
|
||||
m_squelch_isSet = false;
|
||||
audio_mute = 0;
|
||||
m_audio_mute_isSet = false;
|
||||
audio_stereo = 0;
|
||||
m_audio_stereo_isSet = false;
|
||||
lsb_stereo = 0;
|
||||
@ -134,6 +142,8 @@ SWGBFMDemodSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(title != nullptr) {
|
||||
delete title;
|
||||
}
|
||||
@ -176,10 +186,14 @@ SWGBFMDemodSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&af_bandwidth, pJson["afBandwidth"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&de_emphasis, pJson["deEmphasis"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&volume, pJson["volume"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&squelch, pJson["squelch"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&audio_mute, pJson["audioMute"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&audio_stereo, pJson["audioStereo"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&lsb_stereo, pJson["lsbStereo"], "qint32", "");
|
||||
@ -237,12 +251,18 @@ SWGBFMDemodSettings::asJsonObject() {
|
||||
if(m_af_bandwidth_isSet){
|
||||
obj->insert("afBandwidth", QJsonValue(af_bandwidth));
|
||||
}
|
||||
if(m_de_emphasis_isSet){
|
||||
obj->insert("deEmphasis", QJsonValue(de_emphasis));
|
||||
}
|
||||
if(m_volume_isSet){
|
||||
obj->insert("volume", QJsonValue(volume));
|
||||
}
|
||||
if(m_squelch_isSet){
|
||||
obj->insert("squelch", QJsonValue(squelch));
|
||||
}
|
||||
if(m_audio_mute_isSet){
|
||||
obj->insert("audioMute", QJsonValue(audio_mute));
|
||||
}
|
||||
if(m_audio_stereo_isSet){
|
||||
obj->insert("audioStereo", QJsonValue(audio_stereo));
|
||||
}
|
||||
@ -325,6 +345,16 @@ SWGBFMDemodSettings::setAfBandwidth(float af_bandwidth) {
|
||||
this->m_af_bandwidth_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGBFMDemodSettings::getDeEmphasis() {
|
||||
return de_emphasis;
|
||||
}
|
||||
void
|
||||
SWGBFMDemodSettings::setDeEmphasis(qint32 de_emphasis) {
|
||||
this->de_emphasis = de_emphasis;
|
||||
this->m_de_emphasis_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGBFMDemodSettings::getVolume() {
|
||||
return volume;
|
||||
@ -345,6 +375,16 @@ SWGBFMDemodSettings::setSquelch(float squelch) {
|
||||
this->m_squelch_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGBFMDemodSettings::getAudioMute() {
|
||||
return audio_mute;
|
||||
}
|
||||
void
|
||||
SWGBFMDemodSettings::setAudioMute(qint32 audio_mute) {
|
||||
this->audio_mute = audio_mute;
|
||||
this->m_audio_mute_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGBFMDemodSettings::getAudioStereo() {
|
||||
return audio_stereo;
|
||||
@ -519,12 +559,18 @@ SWGBFMDemodSettings::isSet(){
|
||||
if(m_af_bandwidth_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_de_emphasis_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_volume_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_squelch_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_audio_mute_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_audio_stereo_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
||||
@ -54,12 +54,18 @@ public:
|
||||
float getAfBandwidth();
|
||||
void setAfBandwidth(float af_bandwidth);
|
||||
|
||||
qint32 getDeEmphasis();
|
||||
void setDeEmphasis(qint32 de_emphasis);
|
||||
|
||||
float getVolume();
|
||||
void setVolume(float volume);
|
||||
|
||||
float getSquelch();
|
||||
void setSquelch(float squelch);
|
||||
|
||||
qint32 getAudioMute();
|
||||
void setAudioMute(qint32 audio_mute);
|
||||
|
||||
qint32 getAudioStereo();
|
||||
void setAudioStereo(qint32 audio_stereo);
|
||||
|
||||
@ -121,12 +127,18 @@ private:
|
||||
float af_bandwidth;
|
||||
bool m_af_bandwidth_isSet;
|
||||
|
||||
qint32 de_emphasis;
|
||||
bool m_de_emphasis_isSet;
|
||||
|
||||
float volume;
|
||||
bool m_volume_isSet;
|
||||
|
||||
float squelch;
|
||||
bool m_squelch_isSet;
|
||||
|
||||
qint32 audio_mute;
|
||||
bool m_audio_mute_isSet;
|
||||
|
||||
qint32 audio_stereo;
|
||||
bool m_audio_stereo_isSet;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user