FreeDV demod: removed SSB style AGC

This commit is contained in:
f4exb 2019-02-28 13:59:38 +01:00
parent 37916cb568
commit 64993cfa2f
13 changed files with 17 additions and 509 deletions

View File

@ -131,12 +131,8 @@ FreeDVDemod::FreeDVDemod(DeviceSourceAPI *deviceAPI) :
m_speechSampleRate(8000), // fixed 8 kS/s
m_inputFrequencyOffset(0),
m_audioMute(false),
m_agc(12000, agcTarget, 1e-2),
m_simpleAGC(0.003f, 0.0f, 1e-6f),
m_agcActive(false),
m_agcClamping(false),
m_agcNbSamples(12000),
m_agcPowerThreshold(1e-2),
m_agcThresholdGate(0),
m_squelchDelayLine(2*48000),
m_audioActive(false),
m_sampleSink(0),
@ -165,8 +161,7 @@ FreeDVDemod::FreeDVDemod(DeviceSourceAPI *deviceAPI) :
m_magsqPeak = 0.0f;
m_magsqCount = 0;
m_agc.setClampMax(SDR_RX_SCALED/100.0);
m_agc.setClamping(m_agcClamping);
m_simpleAGC.resizeNew(m_modemSampleRate/10, 0.003);
SSBFilter = new fftfilt(m_lowCutoff / m_modemSampleRate, m_hiCutoff / m_modemSampleRate, ssbFftLen);
@ -280,12 +275,16 @@ void FreeDVDemod::feed(const SampleVector::const_iterator& begin, const SampleVe
m_sum.imag(0.0);
}
float agcVal = m_agcActive ? m_agc.feedAndGetValue(sideband[i]) : 10.0; // 10.0 for 3276.8, 1.0 for 327.68
fftfilt::cmplx& delayedSample = m_squelchDelayLine.readBack(m_agc.getStepDownDelay());
m_audioActive = delayedSample.real() != 0.0;
m_squelchDelayLine.write(sideband[i]*agcVal);
fftfilt::cmplx z = delayedSample * m_agc.getStepValue();
fftfilt::cmplx z = sideband[i];
Real demod = (z.real() + z.imag()) * 0.7;
if (m_agcActive)
{
m_simpleAGC.feed(demod);
demod *= 3276.8f / m_simpleAGC.getValue(); // provision for peak to average ratio (here 10)
// if (i == 0) {
// qDebug("FreeDVDemod::feed: m_simpleAGC: %f", m_simpleAGC.getValue());
// }
}
pushSampleToDV((qint16) demod);
}
@ -499,24 +498,9 @@ void FreeDVDemod::applyFreeDVMode(FreeDVDemodSettings::FreeDVMode mode)
//m_interpolatorConsumed = false;
m_interpolatorDistance = (Real) m_inputSampleRate / (Real) modemSampleRate;
m_interpolator.create(16, m_inputSampleRate, m_hiCutoff * 1.5f, 2.0f);
int agcNbSamples = (modemSampleRate / 1000) * (1<<m_settings.m_agcTimeLog2);
int agcThresholdGate = (modemSampleRate / 1000) * m_settings.m_agcThresholdGate; // ms
m_modemSampleRate = modemSampleRate;
if (m_agcNbSamples != agcNbSamples)
{
m_agc.resize(agcNbSamples, agcNbSamples/2, agcTarget);
m_agc.setStepDownDelay(agcNbSamples);
m_agcNbSamples = agcNbSamples;
}
if (m_agcThresholdGate != agcThresholdGate)
{
m_agc.setGate(agcThresholdGate);
m_agcThresholdGate = agcThresholdGate;
}
m_simpleAGC.resizeNew(modemSampleRate/10, 0.003);
if (getMessageQueueToGUI())
{
@ -631,10 +615,6 @@ void FreeDVDemod::applySettings(const FreeDVDemodSettings& settings, bool force)
<< " m_spanLog2: " << settings.m_spanLog2
<< " m_audioMute: " << settings.m_audioMute
<< " m_agcActive: " << settings.m_agc
<< " m_agcClamping: " << settings.m_agcClamping
<< " m_agcTimeLog2: " << settings.m_agcTimeLog2
<< " agcPowerThreshold: " << settings.m_agcPowerThreshold
<< " agcThresholdGate: " << settings.m_agcThresholdGate
<< " m_audioDeviceName: " << settings.m_audioDeviceName
<< " force: " << force;
@ -651,64 +631,6 @@ void FreeDVDemod::applySettings(const FreeDVDemodSettings& settings, bool force)
m_volume /= 4.0; // for 3276.8
}
if ((m_settings.m_agcTimeLog2 != settings.m_agcTimeLog2) || force) {
reverseAPIKeys.append("agcTimeLog2");
}
if ((m_settings.m_agcPowerThreshold != settings.m_agcPowerThreshold) || force) {
reverseAPIKeys.append("agcPowerThreshold");
}
if ((m_settings.m_agcThresholdGate != settings.m_agcThresholdGate) || force) {
reverseAPIKeys.append("agcThresholdGate");
}
if ((m_settings.m_agcClamping != settings.m_agcClamping) || force) {
reverseAPIKeys.append("agcClamping");
}
if ((m_settings.m_agcTimeLog2 != settings.m_agcTimeLog2) ||
(m_settings.m_agcPowerThreshold != settings.m_agcPowerThreshold) ||
(m_settings.m_agcThresholdGate != settings.m_agcThresholdGate) ||
(m_settings.m_agcClamping != settings.m_agcClamping) || force)
{
int agcNbSamples = (m_modemSampleRate / 1000) * (1<<settings.m_agcTimeLog2);
m_agc.setThresholdEnable(settings.m_agcPowerThreshold != -FreeDVDemodSettings::m_minPowerThresholdDB);
double agcPowerThreshold = CalcDb::powerFromdB(settings.m_agcPowerThreshold) * (SDR_RX_SCALED*SDR_RX_SCALED);
int agcThresholdGate = (m_modemSampleRate / 1000) * settings.m_agcThresholdGate; // ms
bool agcClamping = settings.m_agcClamping;
if (m_agcNbSamples != agcNbSamples)
{
m_settingsMutex.lock();
m_agc.resize(agcNbSamples, agcNbSamples/2, agcTarget);
m_agc.setStepDownDelay(agcNbSamples);
m_agcNbSamples = agcNbSamples;
m_settingsMutex.unlock();
}
if (m_agcPowerThreshold != agcPowerThreshold)
{
m_agc.setThreshold(agcPowerThreshold);
m_agcPowerThreshold = agcPowerThreshold;
}
if (m_agcThresholdGate != agcThresholdGate)
{
m_agc.setGate(agcThresholdGate);
m_agcThresholdGate = agcThresholdGate;
}
if (m_agcClamping != agcClamping)
{
m_agc.setClamping(agcClamping);
m_agcClamping = agcClamping;
}
qDebug() << "SBDemod::applySettings: AGC:"
<< " agcNbSamples: " << agcNbSamples
<< " agcPowerThreshold: " << agcPowerThreshold
<< " agcThresholdGate: " << agcThresholdGate
<< " agcClamping: " << agcClamping;
}
if ((settings.m_audioDeviceName != m_settings.m_audioDeviceName) || force)
{
reverseAPIKeys.append("audioDeviceName");
@ -830,18 +752,6 @@ int FreeDVDemod::webapiSettingsPutPatch(
if (channelSettingsKeys.contains("agc")) {
settings.m_agc = response.getFreeDvDemodSettings()->getAgc() != 0;
}
if (channelSettingsKeys.contains("agcClamping")) {
settings.m_agcClamping = response.getFreeDvDemodSettings()->getAgcClamping() != 0;
}
if (channelSettingsKeys.contains("agcTimeLog2")) {
settings.m_agcTimeLog2 = response.getFreeDvDemodSettings()->getAgcTimeLog2();
}
if (channelSettingsKeys.contains("agcPowerThreshold")) {
settings.m_agcPowerThreshold = response.getFreeDvDemodSettings()->getAgcPowerThreshold();
}
if (channelSettingsKeys.contains("agcThresholdGate")) {
settings.m_agcThresholdGate = response.getFreeDvDemodSettings()->getAgcThresholdGate();
}
if (channelSettingsKeys.contains("rgbColor")) {
settings.m_rgbColor = response.getFreeDvDemodSettings()->getRgbColor();
}
@ -893,10 +803,6 @@ void FreeDVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
response.getFreeDvDemodSettings()->setSpanLog2(settings.m_spanLog2);
response.getFreeDvDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
response.getFreeDvDemodSettings()->setAgc(settings.m_agc ? 1 : 0);
response.getFreeDvDemodSettings()->setAgcClamping(settings.m_agcClamping ? 1 : 0);
response.getFreeDvDemodSettings()->setAgcTimeLog2(settings.m_agcTimeLog2);
response.getFreeDvDemodSettings()->setAgcPowerThreshold(settings.m_agcPowerThreshold);
response.getFreeDvDemodSettings()->setAgcThresholdGate(settings.m_agcThresholdGate);
response.getFreeDvDemodSettings()->setRgbColor(settings.m_rgbColor);
if (response.getFreeDvDemodSettings()->getTitle()) {
@ -949,18 +855,6 @@ void FreeDVDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys,
if (channelSettingsKeys.contains("agc") || force) {
swgFreeDVDemodSettings->setAgc(settings.m_agc ? 1 : 0);
}
if (channelSettingsKeys.contains("agcClamping") || force) {
swgFreeDVDemodSettings->setAgcClamping(settings.m_agcClamping ? 1 : 0);
}
if (channelSettingsKeys.contains("agcTimeLog2") || force) {
swgFreeDVDemodSettings->setAgcTimeLog2(settings.m_agcTimeLog2);
}
if (channelSettingsKeys.contains("agcPowerThreshold") || force) {
swgFreeDVDemodSettings->setAgcPowerThreshold(settings.m_agcPowerThreshold);
}
if (channelSettingsKeys.contains("agcThresholdGate") || force) {
swgFreeDVDemodSettings->setAgcThresholdGate(settings.m_agcThresholdGate);
}
if (channelSettingsKeys.contains("rgbColor") || force) {
swgFreeDVDemodSettings->setRgbColor(settings.m_rgbColor);
}

View File

@ -340,12 +340,8 @@ private:
double m_magsqPeak;
int m_magsqCount;
MagSqLevelsStore m_magSqLevelStore;
MagAGC m_agc;
SimpleAGC<4800> m_simpleAGC;
bool m_agcActive;
bool m_agcClamping;
int m_agcNbSamples; //!< number of audio (48 kHz) samples for AGC averaging
double m_agcPowerThreshold; //!< AGC power threshold (linear)
int m_agcThresholdGate; //!< Gate length in number of samples befor threshold triggers
DoubleBufferFIFO<fftfilt::cmplx> m_squelchDelayLine;
bool m_audioActive; //!< True if an audio signal is produced (no AGC or AGC and above threshold)

View File

@ -180,35 +180,6 @@ void FreeDVDemodGUI::on_agc_toggled(bool checked)
applySettings();
}
void FreeDVDemodGUI::on_agcClamping_toggled(bool checked)
{
m_settings.m_agcClamping = checked;
applySettings();
}
void FreeDVDemodGUI::on_agcTimeLog2_valueChanged(int value)
{
QString s = QString::number((1<<value), 'f', 0);
ui->agcTimeText->setText(s);
m_settings.m_agcTimeLog2 = value;
applySettings();
}
void FreeDVDemodGUI::on_agcPowerThreshold_valueChanged(int value)
{
displayAGCPowerThreshold(value);
m_settings.m_agcPowerThreshold = value;
applySettings();
}
void FreeDVDemodGUI::on_agcThresholdGate_valueChanged(int value)
{
QString s = QString::number(value, 'f', 0);
ui->agcThresholdGateText->setText(s);
m_settings.m_agcThresholdGate = value;
applySettings();
}
void FreeDVDemodGUI::on_audioMute_toggled(bool checked)
{
m_audioMute = checked;
@ -397,7 +368,6 @@ void FreeDVDemodGUI::displaySettings()
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
ui->agc->setChecked(m_settings.m_agc);
ui->agcClamping->setChecked(m_settings.m_agcClamping);
ui->audioMute->setChecked(m_settings.m_audioMute);
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
@ -409,33 +379,9 @@ void FreeDVDemodGUI::displaySettings()
ui->volume->setValue(m_settings.m_volume * 10.0);
ui->volumeText->setText(QString("%1").arg(m_settings.m_volume, 0, 'f', 1));
ui->agcTimeLog2->setValue(m_settings.m_agcTimeLog2);
QString s = QString::number((1<<ui->agcTimeLog2->value()), 'f', 0);
ui->agcTimeText->setText(s);
ui->agcPowerThreshold->setValue(m_settings.m_agcPowerThreshold);
displayAGCPowerThreshold(ui->agcPowerThreshold->value());
ui->agcThresholdGate->setValue(m_settings.m_agcThresholdGate);
s = QString::number(ui->agcThresholdGate->value(), 'f', 0);
ui->agcThresholdGateText->setText(s);
blockApplySettings(false);
}
void FreeDVDemodGUI::displayAGCPowerThreshold(int value)
{
if (value == FreeDVDemodSettings::m_minPowerThresholdDB)
{
ui->agcPowerThresholdText->setText("---");
}
else
{
QString s = QString::number(value, 'f', 0);
ui->agcPowerThresholdText->setText(s);
}
}
void FreeDVDemodGUI::leaveEvent(QEvent*)
{
m_channelMarker.setHighlighted(false);

View File

@ -89,8 +89,6 @@ private:
void applyBandwidths(int spanLog2, bool force = false);
void displaySettings();
void displayAGCPowerThreshold(int value);
void leaveEvent(QEvent*);
void enterEvent(QEvent*);
@ -100,10 +98,6 @@ private slots:
void on_freeDVMode_currentIndexChanged(int index);
void on_volume_valueChanged(int value);
void on_agc_toggled(bool checked);
void on_agcClamping_toggled(bool checked);
void on_agcTimeLog2_valueChanged(int value);
void on_agcPowerThreshold_valueChanged(int value);
void on_agcThresholdGate_valueChanged(int value);
void on_audioMute_toggled(bool checked);
void on_spanLog2_valueChanged(int value);
void onWidgetRolled(QWidget* widget, bool rollDown);

View File

@ -334,148 +334,6 @@
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="agcClamping">
<property name="toolTip">
<string>Toggle AGC clamping to maximum allowable signal</string>
</property>
<property name="text">
<string>CL</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="agcTimeLog2">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>AGC time constant (ms in log2 steps)</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>11</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>7</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="agcTimeText">
<property name="minimumSize">
<size>
<width>35</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>AGC time constant (ms)</string>
</property>
<property name="text">
<string>0000</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="agcPowerThreshold">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Power threshold (dB)</string>
</property>
<property name="minimum">
<number>-120</number>
</property>
<property name="maximum">
<number>0</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>-40</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="agcPowerThresholdText">
<property name="minimumSize">
<size>
<width>26</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Power threshold (dB)</string>
</property>
<property name="text">
<string>-000</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="agcThresholdGate">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Power threshold gate (ms)</string>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>4</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="agcThresholdGateText">
<property name="minimumSize">
<size>
<width>16</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Power threshold gate (ms)</string>
</property>
<property name="text">
<string>00</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">

View File

@ -40,10 +40,6 @@ void FreeDVDemodSettings::resetToDefaults()
{
m_audioMute = false;
m_agc = true;
m_agcClamping = false;
m_agcPowerThreshold = -100;
m_agcThresholdGate = 0;
m_agcTimeLog2 = 0;
m_volume = 3.0;
m_spanLog2 = 3;
m_inputFrequencyOffset = 0;
@ -71,10 +67,6 @@ QByteArray FreeDVDemodSettings::serialize() const
s.writeU32(5, m_rgbColor);
s.writeS32(7, m_spanLog2);
s.writeBool(11, m_agc);
s.writeS32(12, m_agcTimeLog2);
s.writeS32(13, m_agcPowerThreshold);
s.writeS32(14, m_agcThresholdGate);
s.writeBool(15, m_agcClamping);
s.writeString(16, m_title);
s.writeString(17, m_audioDeviceName);
s.writeBool(18, m_useReverseAPI);
@ -118,10 +110,6 @@ bool FreeDVDemodSettings::deserialize(const QByteArray& data)
d.readS32(6, &tmp, 30);
d.readS32(7, &m_spanLog2, 3);
d.readBool(11, &m_agc, false);
d.readS32(12, &m_agcTimeLog2, 7);
d.readS32(13, &m_agcPowerThreshold, -40);
d.readS32(14, &m_agcThresholdGate, 4);
d.readBool(15, &m_agcClamping, false);
d.readString(16, &m_title, "SSB Demodulator");
d.readString(17, &m_audioDeviceName, AudioDeviceManager::m_defaultDeviceName);
d.readBool(18, &m_useReverseAPI, false);

View File

@ -39,10 +39,6 @@ struct FreeDVDemodSettings
int m_spanLog2;
bool m_audioMute;
bool m_agc;
bool m_agcClamping;
int m_agcTimeLog2;
int m_agcPowerThreshold;
int m_agcThresholdGate;
quint32 m_rgbColor;
QString m_title;
QString m_audioDeviceName;

View File

@ -2593,22 +2593,6 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "AGC (1 if AGC active else 0)"
},
"agcClamping" : {
"type" : "integer",
"description" : "AGC clamping (1 if AGC clampingactive else 0)"
},
"agcTimeLog2" : {
"type" : "integer",
"description" : "AGC averaging time log2 in milliseconds"
},
"agcPowerThreshold" : {
"type" : "integer",
"description" : "Audio open RF threshold (dB)"
},
"agcThresholdGate" : {
"type" : "integer",
"description" : "Audio squelch gate in ms"
},
"rgbColor" : {
"type" : "integer"
},
@ -24544,7 +24528,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2019-02-25T02:04:30.288+01:00
Generated 2019-02-28T13:56:13.268+01:00
</div>
</div>
</div>

View File

@ -15,18 +15,6 @@ FreeDVDemodSettings:
agc:
description: AGC (1 if AGC active else 0)
type: integer
agcClamping:
description: AGC clamping (1 if AGC clampingactive else 0)
type: integer
agcTimeLog2:
description: AGC averaging time log2 in milliseconds
type: integer
agcPowerThreshold:
description: Audio open RF threshold (dB)
type: integer
agcThresholdGate:
description: Audio squelch gate in ms
type: integer
rgbColor:
type: integer
title:
@ -35,7 +23,7 @@ FreeDVDemodSettings:
type: string
freeDVMode:
type: integer
FreeDVDemodReport:
description: FreeDVDemod
properties:

View File

@ -15,18 +15,6 @@ FreeDVDemodSettings:
agc:
description: AGC (1 if AGC active else 0)
type: integer
agcClamping:
description: AGC clamping (1 if AGC clampingactive else 0)
type: integer
agcTimeLog2:
description: AGC averaging time log2 in milliseconds
type: integer
agcPowerThreshold:
description: Audio open RF threshold (dB)
type: integer
agcThresholdGate:
description: Audio squelch gate in ms
type: integer
rgbColor:
type: integer
title:
@ -35,7 +23,7 @@ FreeDVDemodSettings:
type: string
freeDVMode:
type: integer
FreeDVDemodReport:
description: FreeDVDemod
properties:

View File

@ -2593,22 +2593,6 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "AGC (1 if AGC active else 0)"
},
"agcClamping" : {
"type" : "integer",
"description" : "AGC clamping (1 if AGC clampingactive else 0)"
},
"agcTimeLog2" : {
"type" : "integer",
"description" : "AGC averaging time log2 in milliseconds"
},
"agcPowerThreshold" : {
"type" : "integer",
"description" : "Audio open RF threshold (dB)"
},
"agcThresholdGate" : {
"type" : "integer",
"description" : "Audio squelch gate in ms"
},
"rgbColor" : {
"type" : "integer"
},
@ -24544,7 +24528,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2019-02-25T02:04:30.288+01:00
Generated 2019-02-28T13:56:13.268+01:00
</div>
</div>
</div>

View File

@ -38,14 +38,6 @@ SWGFreeDVDemodSettings::SWGFreeDVDemodSettings() {
m_audio_mute_isSet = false;
agc = 0;
m_agc_isSet = false;
agc_clamping = 0;
m_agc_clamping_isSet = false;
agc_time_log2 = 0;
m_agc_time_log2_isSet = false;
agc_power_threshold = 0;
m_agc_power_threshold_isSet = false;
agc_threshold_gate = 0;
m_agc_threshold_gate_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = nullptr;
@ -72,14 +64,6 @@ SWGFreeDVDemodSettings::init() {
m_audio_mute_isSet = false;
agc = 0;
m_agc_isSet = false;
agc_clamping = 0;
m_agc_clamping_isSet = false;
agc_time_log2 = 0;
m_agc_time_log2_isSet = false;
agc_power_threshold = 0;
m_agc_power_threshold_isSet = false;
agc_threshold_gate = 0;
m_agc_threshold_gate_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = new QString("");
@ -98,10 +82,6 @@ SWGFreeDVDemodSettings::cleanup() {
if(title != nullptr) {
delete title;
}
@ -132,14 +112,6 @@ SWGFreeDVDemodSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&agc, pJson["agc"], "qint32", "");
::SWGSDRangel::setValue(&agc_clamping, pJson["agcClamping"], "qint32", "");
::SWGSDRangel::setValue(&agc_time_log2, pJson["agcTimeLog2"], "qint32", "");
::SWGSDRangel::setValue(&agc_power_threshold, pJson["agcPowerThreshold"], "qint32", "");
::SWGSDRangel::setValue(&agc_threshold_gate, pJson["agcThresholdGate"], "qint32", "");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
@ -179,18 +151,6 @@ SWGFreeDVDemodSettings::asJsonObject() {
if(m_agc_isSet){
obj->insert("agc", QJsonValue(agc));
}
if(m_agc_clamping_isSet){
obj->insert("agcClamping", QJsonValue(agc_clamping));
}
if(m_agc_time_log2_isSet){
obj->insert("agcTimeLog2", QJsonValue(agc_time_log2));
}
if(m_agc_power_threshold_isSet){
obj->insert("agcPowerThreshold", QJsonValue(agc_power_threshold));
}
if(m_agc_threshold_gate_isSet){
obj->insert("agcThresholdGate", QJsonValue(agc_threshold_gate));
}
if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color));
}
@ -257,46 +217,6 @@ SWGFreeDVDemodSettings::setAgc(qint32 agc) {
this->m_agc_isSet = true;
}
qint32
SWGFreeDVDemodSettings::getAgcClamping() {
return agc_clamping;
}
void
SWGFreeDVDemodSettings::setAgcClamping(qint32 agc_clamping) {
this->agc_clamping = agc_clamping;
this->m_agc_clamping_isSet = true;
}
qint32
SWGFreeDVDemodSettings::getAgcTimeLog2() {
return agc_time_log2;
}
void
SWGFreeDVDemodSettings::setAgcTimeLog2(qint32 agc_time_log2) {
this->agc_time_log2 = agc_time_log2;
this->m_agc_time_log2_isSet = true;
}
qint32
SWGFreeDVDemodSettings::getAgcPowerThreshold() {
return agc_power_threshold;
}
void
SWGFreeDVDemodSettings::setAgcPowerThreshold(qint32 agc_power_threshold) {
this->agc_power_threshold = agc_power_threshold;
this->m_agc_power_threshold_isSet = true;
}
qint32
SWGFreeDVDemodSettings::getAgcThresholdGate() {
return agc_threshold_gate;
}
void
SWGFreeDVDemodSettings::setAgcThresholdGate(qint32 agc_threshold_gate) {
this->agc_threshold_gate = agc_threshold_gate;
this->m_agc_threshold_gate_isSet = true;
}
qint32
SWGFreeDVDemodSettings::getRgbColor() {
return rgb_color;
@ -347,10 +267,6 @@ SWGFreeDVDemodSettings::isSet(){
if(m_span_log2_isSet){ isObjectUpdated = true; break;}
if(m_audio_mute_isSet){ isObjectUpdated = true; break;}
if(m_agc_isSet){ isObjectUpdated = true; break;}
if(m_agc_clamping_isSet){ isObjectUpdated = true; break;}
if(m_agc_time_log2_isSet){ isObjectUpdated = true; break;}
if(m_agc_power_threshold_isSet){ isObjectUpdated = true; break;}
if(m_agc_threshold_gate_isSet){ isObjectUpdated = true; break;}
if(m_rgb_color_isSet){ isObjectUpdated = true; break;}
if(title != nullptr && *title != QString("")){ isObjectUpdated = true; break;}
if(audio_device_name != nullptr && *audio_device_name != QString("")){ isObjectUpdated = true; break;}

View File

@ -57,18 +57,6 @@ public:
qint32 getAgc();
void setAgc(qint32 agc);
qint32 getAgcClamping();
void setAgcClamping(qint32 agc_clamping);
qint32 getAgcTimeLog2();
void setAgcTimeLog2(qint32 agc_time_log2);
qint32 getAgcPowerThreshold();
void setAgcPowerThreshold(qint32 agc_power_threshold);
qint32 getAgcThresholdGate();
void setAgcThresholdGate(qint32 agc_threshold_gate);
qint32 getRgbColor();
void setRgbColor(qint32 rgb_color);
@ -100,18 +88,6 @@ private:
qint32 agc;
bool m_agc_isSet;
qint32 agc_clamping;
bool m_agc_clamping_isSet;
qint32 agc_time_log2;
bool m_agc_time_log2_isSet;
qint32 agc_power_threshold;
bool m_agc_power_threshold_isSet;
qint32 agc_threshold_gate;
bool m_agc_threshold_gate_isSet;
qint32 rgb_color;
bool m_rgb_color_isSet;