1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-28 15:56:33 -04:00

SSB demod: added AGC configuration

This commit is contained in:
f4exb 2017-07-25 08:40:15 +02:00
parent 810955ac58
commit d15b484a4f
5 changed files with 70 additions and 9 deletions

View File

@ -84,9 +84,23 @@ void SSBDemod::configure(MessageQueue* messageQueue,
bool audioBinaural,
bool audioFlipChannel,
bool dsb,
bool audioMute)
bool audioMute,
bool agc,
int agcTimeLog2,
int agcPowerThreshold)
{
Message* cmd = MsgConfigureSSBDemod::create(Bandwidth, LowCutoff, volume, spanLog2, audioBinaural, audioFlipChannel, dsb, audioMute);
Message* cmd = MsgConfigureSSBDemod::create(
Bandwidth,
LowCutoff,
volume,
spanLog2,
audioBinaural,
audioFlipChannel,
dsb,
audioMute,
agc,
agcTimeLog2,
agcPowerThreshold);
messageQueue->push(cmd);
}

View File

@ -43,7 +43,10 @@ public:
bool audioBinaural,
bool audioFlipChannels,
bool dsb,
bool audioMute);
bool audioMute,
bool agc,
int agcTimeLog2,
int agcPowerThreshold);
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
virtual void start();
@ -76,6 +79,9 @@ private:
bool getAudioFlipChannels() const { return m_audioFlipChannels; }
bool getDSB() const { return m_dsb; }
bool getAudioMute() const { return m_audioMute; }
bool getAGC() const { return m_agc; }
int getAGCTimeLog2() { return m_agcTimeLog2; }
int getAGCPowerThershold() { return m_agcPowerThreshold; }
static MsgConfigureSSBDemod* create(Real Bandwidth,
Real LowCutoff,
@ -84,9 +90,23 @@ private:
bool audioBinaural,
bool audioFlipChannels,
bool dsb,
bool audioMute)
bool audioMute,
bool agc,
int agcTimeLog2,
int agcPowerThreshold)
{
return new MsgConfigureSSBDemod(Bandwidth, LowCutoff, volume, spanLog2, audioBinaural, audioFlipChannels, dsb, audioMute);
return new MsgConfigureSSBDemod(
Bandwidth,
LowCutoff,
volume,
spanLog2,
audioBinaural,
audioFlipChannels,
dsb,
audioMute,
agc,
agcTimeLog2,
agcPowerThreshold);
}
private:
@ -98,6 +118,9 @@ private:
bool m_audioFlipChannels;
bool m_dsb;
bool m_audioMute;
bool m_agc;
int m_agcTimeLog2;
int m_agcPowerThreshold;
MsgConfigureSSBDemod(Real Bandwidth,
Real LowCutoff,
@ -106,7 +129,10 @@ private:
bool audioBinaural,
bool audioFlipChannels,
bool dsb,
bool audioMute) :
bool audioMute,
bool agc,
int agcTimeLog2,
int agcPowerThreshold) :
Message(),
m_Bandwidth(Bandwidth),
m_LowCutoff(LowCutoff),
@ -115,7 +141,10 @@ private:
m_audioBinaural(audioBinaural),
m_audioFlipChannels(audioFlipChannels),
m_dsb(dsb),
m_audioMute(audioMute)
m_audioMute(audioMute),
m_agc(agc),
m_agcTimeLog2(agcTimeLog2),
m_agcPowerThreshold(agcPowerThreshold)
{ }
};

View File

@ -468,7 +468,10 @@ void SSBDemodGUI::applySettings()
m_audioBinaural,
m_audioFlipChannels,
m_dsb,
ui->audioMute->isChecked());
ui->audioMute->isChecked(),
ui->agc->isChecked(),
ui->agcTimeLog2->value(),
ui->agcPowerThreshold->value());
}
}

View File

@ -48,6 +48,9 @@ private slots:
void on_BW_valueChanged(int value);
void on_lowCut_valueChanged(int value);
void on_volume_valueChanged(int value);
void on_agc_stateChanged(int state);
void on_agcTimeLog2_valueChanged(int value);
void on_agcPowerThreshold_valueChanged(int value);
void on_audioMute_toggled(bool checked);
void on_spanLog2_valueChanged(int value);
void onWidgetRolled(QWidget* widget, bool rollDown);

View File

@ -459,7 +459,7 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox">
<widget class="QCheckBox" name="agc">
<property name="text">
<string>AGC</string>
</property>
@ -511,6 +511,18 @@
<property name="toolTip">
<string>AGC power threshold (dB)</string>
</property>
<property name="minimum">
<number>-99</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>