1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-27 07:16:48 -04:00

SSB demod: start level meter at -120 dB when in 24 bit mode

This commit is contained in:
f4exb 2018-02-10 05:43:11 +01:00
parent 75f9da8465
commit 4d5376ac7b
4 changed files with 14 additions and 2 deletions

View File

@ -413,6 +413,7 @@ void SSBDemodGUI::applyBandwidths(bool force)
ui->lowCut->blockSignals(false);
ui->BW->blockSignals(false);
ui->channelPowerMeter->setRange(SSBDemodSettings::m_minPowerThresholdDB, 0);
m_settings.m_dsb = dsb;
m_settings.m_spanLog2 = spanLog2;
@ -553,8 +554,8 @@ void SSBDemodGUI::tick()
double powDbPeak = CalcDb::dbPower(magsqPeak);
ui->channelPowerMeter->levelChanged(
(100.0f + powDbAvg) / 100.0f,
(100.0f + powDbPeak) / 100.0f,
(SSBDemodSettings::m_mminPowerThresholdDBf + powDbAvg) / SSBDemodSettings::m_mminPowerThresholdDBf,
(SSBDemodSettings::m_mminPowerThresholdDBf + powDbPeak) / SSBDemodSettings::m_mminPowerThresholdDBf,
nbMagsqSamples);
if (m_tickCount % 4 == 0) {

View File

@ -21,8 +21,13 @@
#include "settings/serializable.h"
#include "ssbdemodsettings.h"
#ifdef SDR_RX_SAMPLE_24BIT
const int SSBDemodSettings::m_minPowerThresholdDB = -120;
const float SSBDemodSettings::m_mminPowerThresholdDBf = 120.0f;
#else
const int SSBDemodSettings::m_minPowerThresholdDB = -100;
const float SSBDemodSettings::m_mminPowerThresholdDBf = 100.0f;
#endif
SSBDemodSettings::SSBDemodSettings() :
m_channelMarker(0),

View File

@ -283,6 +283,11 @@ LevelMeterSignalDB::~LevelMeterSignalDB()
{
}
void LevelMeterSignalDB::setRange(int min, int max)
{
m_scaleEngine.setRange(Unit::Decibel, min, max);
}
void LevelMeterSignalDB::resized()
{
if (m_backgroundPixmap)

View File

@ -161,6 +161,7 @@ public:
virtual ~LevelMeterSignalDB();
void setColorTheme(ColorTheme colorTheme) { m_colorTheme = colorTheme; }
void setRange(int min, int max);
static const QColor m_avgColor[3];
static const QColor m_decayedPeakColor[3];