mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 13:11:20 -05:00 
			
		
		
		
	SSB demod: start level meter at -120 dB when in 24 bit mode
This commit is contained in:
		
							parent
							
								
									75f9da8465
								
							
						
					
					
						commit
						4d5376ac7b
					
				@ -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) {
 | 
			
		||||
 | 
			
		||||
@ -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),
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
 | 
			
		||||
@ -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];
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user