diff --git a/Readme.md b/Readme.md index cf284de5b..83f46bdbe 100644 --- a/Readme.md +++ b/Readme.md @@ -112,21 +112,24 @@ Done since the fork - Added a scope widget in the channel analyzer plugin - Channel analyzer bandwidth up to half the available RF (IF) bandwidth (was 48k fixed) - Enhanced scope display and controls: scale display, better X (time) and Y scales control, grid fit to scale, effectively implementing triggers, trigger on magnitude and phase, properly handling time shift, ... - - Enhanced spectrum display: Histogram: define NO_AVX, wider decay range, make stroke and late holdoff adjustable. Added option to show live spectrum (had only max hold before). + - Enhanced spectrum display: Histogram: wider decay range, make stroke and late holdoff adjustable. Added option to show live spectrum (had only max hold before). - Enhanced channel analyzer: enhanced scope and spectrum displays as mentioned above, make the spectrum display synchronous to scope (hence triggerable a la E4406A). - Sort channel plugins by delta frequency and type before saving to preset - Implemented scope pre-trigger delay - Implemented variable scope memory depth - Implemented trigger delay - Trigger on both edges + - Spectrum histogram clear ===== To Do ===== - - Enhance presets management (Edit, Move, Import/Export from/to human readable format like JSON) + - Trigger line display for all trigger modes - Level calibration - - Enhance WFM (stereo, RDS?) - - Even more demods ... + - Enhance presets management (Edit, Move, Import/Export from/to human readable format like JSON) - recording capability - Tx channels for Rx/Tx boards like BladeRF + - Enhance WFM (stereo, RDS?) + - Even more demods ... + \ No newline at end of file diff --git a/include-gpl/gui/glspectrum.h b/include-gpl/gui/glspectrum.h index 152f7a83e..ce0c7f180 100644 --- a/include-gpl/gui/glspectrum.h +++ b/include-gpl/gui/glspectrum.h @@ -54,6 +54,7 @@ public: void removeChannelMarker(ChannelMarker* channelMarker); void newSpectrum(const std::vector<Real>& spectrum, int fftSize); + void clearSpectrumHistogram(); private: struct ChannelMarkerState { diff --git a/include-gpl/gui/glspectrumgui.h b/include-gpl/gui/glspectrumgui.h index 8c55d3e66..fd1b5bcb6 100644 --- a/include-gpl/gui/glspectrumgui.h +++ b/include-gpl/gui/glspectrumgui.h @@ -70,6 +70,7 @@ private slots: void on_current_toggled(bool checked); void on_invert_toggled(bool checked); void on_grid_toggled(bool checked); + void on_clearSpectrum_clicked(bool checked); }; #endif // INCLUDE_GLSPECTRUMGUI_H diff --git a/sdrbase/gui/glspectrum.cpp b/sdrbase/gui/glspectrum.cpp index 6eb3ef1cb..b8ff4d34c 100644 --- a/sdrbase/gui/glspectrum.cpp +++ b/sdrbase/gui/glspectrum.cpp @@ -472,6 +472,18 @@ void GLSpectrum::resizeGL(int width, int height) m_changesPending = true; } +void GLSpectrum::clearSpectrumHistogram() +{ + if(!m_mutex.tryLock(2)) + return; + + memset(m_histogram, 0x00, 100 * m_fftSize); + memset(m_histogramHoldoff, 0x07, 100 * m_fftSize); + + m_mutex.unlock(); + update(); +} + void GLSpectrum::paintGL() { if(!m_mutex.tryLock(2)) diff --git a/sdrbase/gui/glspectrumgui.cpp b/sdrbase/gui/glspectrumgui.cpp index 65b53918f..7a07ad91f 100644 --- a/sdrbase/gui/glspectrumgui.cpp +++ b/sdrbase/gui/glspectrumgui.cpp @@ -288,3 +288,9 @@ void GLSpectrumGUI::on_traceIntensity_valueChanged(int index) if(m_glSpectrum != NULL) m_glSpectrum->setDisplayTraceIntensity(m_displayTraceIntensity); } + +void GLSpectrumGUI::on_clearSpectrum_clicked(bool checked) +{ + if(m_glSpectrum != NULL) + m_glSpectrum->clearSpectrumHistogram(); +} diff --git a/sdrbase/gui/glspectrumgui.ui b/sdrbase/gui/glspectrumgui.ui index 655742735..32dc43774 100644 --- a/sdrbase/gui/glspectrumgui.ui +++ b/sdrbase/gui/glspectrumgui.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>273</width> + <width>320</width> <height>60</height> </rect> </property> @@ -270,6 +270,9 @@ <property name="checkable"> <bool>true</bool> </property> + <property name="autoRaise"> + <bool>false</bool> + </property> </widget> </item> <item> @@ -484,6 +487,38 @@ </property> </widget> </item> + <item> + <widget class="QPushButton" name="clearSpectrum"> + <property name="minimumSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + <property name="toolTip"> + <string>Clear spectrum histogram</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="../resources/res.qrc"> + <normaloff>:/clear.png</normaloff>:/clear.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>16</width> + <height>16</height> + </size> + </property> + </widget> + </item> <item> <widget class="QDial" name="traceIntensity"> <property name="maximumSize"> diff --git a/sdrbase/resources/clear.png b/sdrbase/resources/clear.png new file mode 100644 index 000000000..5fff0a4c3 Binary files /dev/null and b/sdrbase/resources/clear.png differ diff --git a/sdrbase/resources/grid.png b/sdrbase/resources/grid.png index e384a5394..c7285a777 100644 Binary files a/sdrbase/resources/grid.png and b/sdrbase/resources/grid.png differ diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc index 6c71bf785..ff5740d6f 100644 --- a/sdrbase/resources/res.qrc +++ b/sdrbase/resources/res.qrc @@ -24,5 +24,6 @@ <file>vertical_w.png</file> <file>current.png</file> <file>slopeb_icon.png</file> + <file>clear.png</file> </qresource> </RCC>