mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-15 12:51:49 -05:00
SSB demod: set minimum squelch threshold to -120 dB with constant
This commit is contained in:
parent
fdabbe49da
commit
c744615b3a
@ -426,7 +426,7 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force)
|
||||
(m_settings.m_agcClamping != settings.m_agcClamping) || force)
|
||||
{
|
||||
int agcNbSamples = 48 * (1<<settings.m_agcTimeLog2);
|
||||
m_agc.setThresholdEnable(settings.m_agcPowerThreshold != -110);
|
||||
m_agc.setThresholdEnable(settings.m_agcPowerThreshold != -SSBDemodSettings::m_minPowerThresholdDB);
|
||||
double agcPowerThreshold = CalcDb::powerFromdB(settings.m_agcPowerThreshold) * (SDR_RX_SCALED*SDR_RX_SCALED);
|
||||
int agcThresholdGate = 48 * settings.m_agcThresholdGate; // ms
|
||||
bool agcClamping = settings.m_agcClamping;
|
||||
|
@ -523,7 +523,7 @@ void SSBDemodGUI::displayUDPAddress()
|
||||
|
||||
void SSBDemodGUI::displayAGCPowerThreshold(int value)
|
||||
{
|
||||
if (value == -110)
|
||||
if (value == -SSBDemodSettings::m_minPowerThresholdDB)
|
||||
{
|
||||
ui->agcPowerThresholdText->setText("---");
|
||||
}
|
||||
|
@ -777,7 +777,7 @@
|
||||
<string>Power threshold (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-110</number>
|
||||
<number>-120</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>0</number>
|
||||
|
@ -21,6 +21,9 @@
|
||||
#include "settings/serializable.h"
|
||||
#include "ssbdemodsettings.h"
|
||||
|
||||
const int SSBDemodSettings::m_minPowerThresholdDB = -120;
|
||||
const float SSBDemodSettings::m_mminPowerThresholdDBf = 120.0f;
|
||||
|
||||
SSBDemodSettings::SSBDemodSettings() :
|
||||
m_channelMarker(0),
|
||||
m_spectrumGUI(0)
|
||||
|
@ -53,6 +53,9 @@ struct SSBDemodSettings
|
||||
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
|
||||
static const int m_minPowerThresholdDB;
|
||||
static const float m_mminPowerThresholdDBf;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user