mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-17 05:41:56 -05:00
Added button to change the brightess of the spectrum display grid
This commit is contained in:
parent
3e922dbb0a
commit
e15f4f26f1
@ -78,12 +78,12 @@ Done since the fork
|
||||
- SSB bandwidth can now be tuned in steps of 100 Hz
|
||||
- NFM and SSB receiver in focus trigger the display of the central frequency line on the spectrum frequency scale thus facilitating its identification
|
||||
- Added AM demod so now you can listen to air traffic!
|
||||
|
||||
- Added the possibility to change the brightness and/or color of the grid.
|
||||
|
||||
=====
|
||||
To Do
|
||||
=====
|
||||
|
||||
- Add the possibility to change the brightness and/or color of the grid. Sometimes it is barely visible yet useful
|
||||
- Fix and possibly enhance (stereo, RDS?) WFM. Maybe into two plugins one for plain WFM and the other for Broadcast FM
|
||||
- Make the the SSB filter frequency bounds tunable so that it can be used for CW. Change marker overlay accordingly.
|
||||
- Possibility to completely undock the receiver in a separate window. Useful when there are many receivers
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
void setDisplayMaxHold(bool display);
|
||||
void setDisplayHistogram(bool display);
|
||||
void setDisplayGrid(bool display);
|
||||
void setDisplayGridIntensity(int intensity);
|
||||
|
||||
void addChannelMarker(ChannelMarker* channelMarker);
|
||||
void removeChannelMarker(ChannelMarker* channelMarker);
|
||||
@ -87,6 +88,7 @@ private:
|
||||
int m_fftSize;
|
||||
|
||||
bool m_displayGrid;
|
||||
int m_displayGridIntensity;
|
||||
bool m_invertedWaterfall;
|
||||
|
||||
std::vector<Real> m_maxHold;
|
||||
|
@ -39,6 +39,7 @@ private:
|
||||
Real m_refLevel;
|
||||
Real m_powerRange;
|
||||
int m_decay;
|
||||
int m_displayGridIntensity;
|
||||
bool m_displayWaterfall;
|
||||
bool m_invertedWaterfall;
|
||||
bool m_displayMaxHold;
|
||||
@ -54,6 +55,7 @@ private slots:
|
||||
void on_refLevel_currentIndexChanged(int index);
|
||||
void on_levelRange_currentIndexChanged(int index);
|
||||
void on_decay_currentIndexChanged(int index);
|
||||
void on_gridIntensity_valueChanged(int index);
|
||||
|
||||
void on_waterfall_toggled(bool checked);
|
||||
void on_histogram_toggled(bool checked);
|
||||
|
@ -33,6 +33,7 @@ GLSpectrum::GLSpectrum(QWidget* parent) :
|
||||
m_sampleRate(500000),
|
||||
m_fftSize(512),
|
||||
m_displayGrid(true),
|
||||
m_displayGridIntensity(5),
|
||||
m_invertedWaterfall(false),
|
||||
m_displayMaxHold(false),
|
||||
m_leftMarginTextureAllocated(false),
|
||||
@ -217,6 +218,15 @@ void GLSpectrum::setDisplayGrid(bool display)
|
||||
update();
|
||||
}
|
||||
|
||||
void GLSpectrum::setDisplayGridIntensity(int intensity)
|
||||
{
|
||||
m_displayGridIntensity = intensity;
|
||||
if (m_displayGridIntensity > 100) {
|
||||
m_displayGridIntensity = 100;
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
void GLSpectrum::addChannelMarker(ChannelMarker* channelMarker)
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
@ -727,7 +737,8 @@ void GLSpectrum::paintGL()
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glLineWidth(1.0f);
|
||||
glColor4f(1, 1, 1, 0.05f);
|
||||
//glColor4f(1, 1, 1, 0.05f);
|
||||
glColor4f(1, 1, 1, m_displayGridIntensity / 100.0);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(m_glWaterfallRect.x(), m_glWaterfallRect.y(), 0);
|
||||
@ -772,7 +783,7 @@ void GLSpectrum::paintGL()
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glLineWidth(1.0f);
|
||||
glColor4f(1, 1, 1, 0.05f);
|
||||
glColor4f(1, 1, 1, m_displayGridIntensity / 100.0);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(m_glHistogramRect.x(), m_glHistogramRect.y(), 0);
|
||||
|
@ -17,6 +17,7 @@ GLSpectrumGUI::GLSpectrumGUI(QWidget* parent) :
|
||||
m_refLevel(0),
|
||||
m_powerRange(100),
|
||||
m_decay(0),
|
||||
m_displayGridIntensity(1),
|
||||
m_displayWaterfall(true),
|
||||
m_invertedWaterfall(false),
|
||||
m_displayMaxHold(false),
|
||||
@ -52,6 +53,7 @@ void GLSpectrumGUI::resetToDefaults()
|
||||
m_refLevel = 0;
|
||||
m_powerRange = 100;
|
||||
m_decay = 0;
|
||||
m_displayGridIntensity = 5,
|
||||
m_displayWaterfall = true;
|
||||
m_invertedWaterfall = false;
|
||||
m_displayMaxHold = false;
|
||||
@ -74,6 +76,7 @@ QByteArray GLSpectrumGUI::serialize() const
|
||||
s.writeBool(8, m_displayMaxHold);
|
||||
s.writeBool(9, m_displayHistogram);
|
||||
s.writeS32(10, m_decay);
|
||||
s.writeS32(13, m_displayGridIntensity);
|
||||
s.writeBool(11, m_displayGrid);
|
||||
s.writeBool(12, m_invert);
|
||||
return s.final();
|
||||
@ -99,6 +102,7 @@ bool GLSpectrumGUI::deserialize(const QByteArray& data)
|
||||
d.readBool(8, &m_displayMaxHold, false);
|
||||
d.readBool(9, &m_displayHistogram, false);
|
||||
d.readS32(10, &m_decay, 0);
|
||||
d.readS32(13, &m_displayGridIntensity, 0);
|
||||
d.readBool(11, &m_displayGrid, false);
|
||||
d.readBool(12, &m_invert, true);
|
||||
applySettings();
|
||||
@ -126,6 +130,7 @@ void GLSpectrumGUI::applySettings()
|
||||
ui->histogram->setChecked(m_displayHistogram);
|
||||
ui->invert->setChecked(m_invert);
|
||||
ui->grid->setChecked(m_displayGrid);
|
||||
ui->gridIntensity->setSliderPosition(m_displayGridIntensity);
|
||||
|
||||
m_glSpectrum->setDisplayWaterfall(m_displayWaterfall);
|
||||
m_glSpectrum->setInvertedWaterfall(m_invertedWaterfall);
|
||||
@ -134,6 +139,7 @@ void GLSpectrumGUI::applySettings()
|
||||
m_glSpectrum->setDecay(m_decay);
|
||||
m_glSpectrum->setInvertedWaterfall(m_invert);
|
||||
m_glSpectrum->setDisplayGrid(m_displayGrid);
|
||||
m_glSpectrum->setDisplayGridIntensity(m_displayGridIntensity);
|
||||
|
||||
m_spectrumVis->configure(m_messageQueue, m_fftSize, m_fftOverlap, (FFTWindow::Function)m_fftWindow);
|
||||
}
|
||||
@ -208,3 +214,10 @@ void GLSpectrumGUI::on_grid_toggled(bool checked)
|
||||
if(m_glSpectrum != NULL)
|
||||
m_glSpectrum->setDisplayGrid(m_displayGrid);
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::on_gridIntensity_valueChanged(int index)
|
||||
{
|
||||
m_displayGridIntensity = index;
|
||||
if(m_glSpectrum != NULL)
|
||||
m_glSpectrum->setDisplayGridIntensity(m_displayGridIntensity);
|
||||
}
|
||||
|
@ -457,13 +457,13 @@
|
||||
<string>Grid intensity</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>16</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>64</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user