summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Long <willcode4@gmail.com>2023-12-19 16:02:29 -0500
committerJeff Long <willcode4@gmail.com>2023-12-19 17:17:16 -0500
commit11f933fa870f5163b6454317c788c582d0df19c6 (patch)
tree48679a3e0f0ea5578884e0f4acd6bc6b0113d985
parentv3.10.9.0-rc1 (diff)
downloadgnuradio-11f933fa870f5163b6454317c788c582d0df19c6.tar.xz
gnuradio-11f933fa870f5163b6454317c788c582d0df19c6.zip
Revert F15 (Fosphor) Sink
Reverts the following commits: - 47032f379 - 24f0236da - 0c0238146 - 182588931 - b38273334 - 50fd4caf2 - 8888925a8 - a38e99e45 - d2d28a839
-rw-r--r--gr-qtgui/CMakeLists.txt6
-rw-r--r--gr-qtgui/grc/CMakeLists.txt6
-rw-r--r--gr-qtgui/grc/qtgui.tree.yml2
-rw-r--r--gr-qtgui/grc/qtgui_rfnoc_f15_display.block.yml88
-rw-r--r--gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt1
-rw-r--r--gr-qtgui/include/gnuradio/qtgui/rfnoc_f15_display.h93
-rw-r--r--gr-qtgui/lib/CMakeLists.txt25
-rw-r--r--gr-qtgui/lib/QRfnocF15ColorMapper.cc212
-rw-r--r--gr-qtgui/lib/QRfnocF15ColorMapper.h55
-rw-r--r--gr-qtgui/lib/QRfnocF15Surface.cc655
-rw-r--r--gr-qtgui/lib/QRfnocF15Surface.h106
-rw-r--r--gr-qtgui/lib/axis.c156
-rw-r--r--gr-qtgui/lib/axis.h36
-rw-r--r--gr-qtgui/lib/rfnoc_f15.qrc9
-rw-r--r--gr-qtgui/lib/rfnoc_f15/pal_cubehelix.pngbin884 -> 0 bytes
-rw-r--r--gr-qtgui/lib/rfnoc_f15/pal_iron.pngbin295 -> 0 bytes
-rw-r--r--gr-qtgui/lib/rfnoc_f15/pal_rainbow.pngbin351 -> 0 bytes
-rw-r--r--gr-qtgui/lib/rfnoc_f15/pal_test.pngbin142 -> 0 bytes
-rw-r--r--gr-qtgui/lib/rfnoc_f15/palettes.txt51
-rw-r--r--gr-qtgui/lib/rfnoc_f15_display_impl.cc242
-rw-r--r--gr-qtgui/lib/rfnoc_f15_display_impl.h83
-rw-r--r--gr-qtgui/python/qtgui/CMakeLists.txt3
-rw-r--r--gr-qtgui/python/qtgui/bindings/CMakeLists.txt17
-rw-r--r--gr-qtgui/python/qtgui/bindings/docstrings/rfnoc_f15_display_pydoc_template.h48
-rw-r--r--gr-qtgui/python/qtgui/bindings/python_bindings.cc6
-rw-r--r--gr-qtgui/python/qtgui/bindings/rfnoc_f15_display_python.cc106
-rw-r--r--gr-uhd/examples/grc/rfnoc_fosphor.grc406
27 files changed, 5 insertions, 2407 deletions
diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt
index 2b1f6ce32..0fc8b5e45 100644
--- a/gr-qtgui/CMakeLists.txt
+++ b/gr-qtgui/CMakeLists.txt
@@ -14,7 +14,6 @@ include(GrPython)
find_package(Qt5 QUIET
COMPONENTS Widgets
- OPTIONAL_COMPONENTS OpenGL
)
set(QT_FOUND ${Qt5Widgets_FOUND})
@@ -47,10 +46,7 @@ set(GR_PKG_QTGUI_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/qt-gui)
# Begin conditional configuration
########################################################################
if(ENABLE_GR_QTGUI)
- if (Qt5OpenGL_FOUND)
- set(ENABLE_GR_QTGUI_OPENGL TRUE)
- set(OpenGL_GL_PREFERENCE GLVND)
- endif()
+
########################################################################
# Add subdirectories
########################################################################
diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt
index a0ef04976..543944838 100644
--- a/gr-qtgui/grc/CMakeLists.txt
+++ b/gr-qtgui/grc/CMakeLists.txt
@@ -8,12 +8,6 @@
########################################################################
file(GLOB yml_files "*.yml")
-if(NOT ENABLE_GR_QTGUI_OPENGL)
- list(REMOVE_ITEM yml_files
- "${CMAKE_CURRENT_SOURCE_DIR}/qtgui_rfnoc_f15_display.block.yml"
- )
-endif()
-
macro(REPLACE_IN_FILE _yml_block match replace)
set(yml_block_src "${CMAKE_CURRENT_SOURCE_DIR}/${_yml_block}")
set(yml_block "${CMAKE_CURRENT_BINARY_DIR}/${_yml_block}")
diff --git a/gr-qtgui/grc/qtgui.tree.yml b/gr-qtgui/grc/qtgui.tree.yml
index 8303666c6..d86096373 100644
--- a/gr-qtgui/grc/qtgui.tree.yml
+++ b/gr-qtgui/grc/qtgui.tree.yml
@@ -38,4 +38,4 @@
- variable_qtgui_msg_push_button
- variable_qtgui_toggle_button_msg
- variable_qtgui_toggle_switch
- - qtgui_rfnoc_f15_display
+ \ No newline at end of file
diff --git a/gr-qtgui/grc/qtgui_rfnoc_f15_display.block.yml b/gr-qtgui/grc/qtgui_rfnoc_f15_display.block.yml
deleted file mode 100644
index a500b93a7..000000000
--- a/gr-qtgui/grc/qtgui_rfnoc_f15_display.block.yml
+++ /dev/null
@@ -1,88 +0,0 @@
-id: qtgui_rfnoc_f15_display
-label: QT GUI RFNoC Fosphor Display (Byte Vector)
-flags: [ python ]
-
-parameters:
-- id: center_freq
- label: Center Frequency (Hz)
- dtype: real
- default: 0.0
-- id: samp_rate
- label: Sample Rate (Hz)
- dtype: real
- default: samp_rate
-- id: fftsize
- label: FFT Size
- dtype: int
- default: 1024
-- id: pwr_bins
- label: Power Bins
- dtype: int
- default: 64
-- id: wf_enabled
- label: Waterfall Display
- dtype: bool
- default: 'True'
- options: ['True', 'False']
- option_labels: [Enabled, Disabled]
-- id: wf_lines
- label: Waterfall History
- dtype: int
- default: 512
- hide: ${'all' if str(wf_enabled) == 'False' else 'none'}
-- id: grid_enabled
- label: Grid
- dtype: enum
- default: 'True'
- options: ['True', 'False']
- option_labels: [Enabled, Disabled]
-- id: palette
- label: Color Palette
- dtype: enum
- default: 'True'
- options: ['iron', 'cubehelix', 'sdrangelove_histogram', 'rainbow', 'prog']
- option_labels: [Iron, Cube Helix, SDRangelove, Rainbow, Prog's]
-- id: frame_rate
- label: Target Frame Rate
- dtype: int
- default: 30
-- id: gui_hint
- label: GUI Hint
- dtype: gui_hint
- hide: part
-
-inputs:
-- label: in_hist
- dtype: byte
- vlen: ${fftsize}
- optional: true
-- label: in_wf
- dtype: byte
- vlen: ${fftsize}
- optional: true
- hide: ${ not wf_enabled }
-
-outputs:
-- domain: message
- id: cfg
- optional: true
-
-
-templates:
- imports: import sip
- make: |-
- <%
- win = 'self._%s_win' % id
- %>\
- qtgui.rfnoc_f15_display(${fftsize}, ${pwr_bins}, ${wf_lines})
- self.${id}.set_frame_rate(${frame_rate})
- self.${id}.set_frequency_range(${center_freq}, ${samp_rate})
- self.${id}.set_waterfall(${wf_enabled})
- self.${id}.set_grid(${grid_enabled})
- self.${id}.set_palette("${palette}")
- self._${id}_win = sip.wrapinstance(self.${id}.qwidget(), Qt.QWidget)
- ${gui_hint() % win}
- callbacks:
- - set_frequency_range(${center_freq}, ${samp_rate})
-
-file_format: 1
diff --git a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
index a58fa4b3d..d71cb7104 100644
--- a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
+++ b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
@@ -41,7 +41,6 @@ install(
plot_raster.h
plot_waterfall.h
qtgui_types.h
- rfnoc_f15_display.h
sink_c.h
sink_f.h
spectrumUpdateEvents.h
diff --git a/gr-qtgui/include/gnuradio/qtgui/rfnoc_f15_display.h b/gr-qtgui/include/gnuradio/qtgui/rfnoc_f15_display.h
deleted file mode 100644
index 99b464f1c..000000000
--- a/gr-qtgui/include/gnuradio/qtgui/rfnoc_f15_display.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2015 Ettus Research
- * Copyright 2020 Ettus Research, LLC. A National Instruments Brand
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#ifndef INCLUDED_QTGUI_RFNOC_F15_DISPLAY_H
-#define INCLUDED_QTGUI_RFNOC_F15_DISPLAY_H
-
-#ifdef ENABLE_PYTHON
-#include <Python.h>
-#endif
-
-#include <gnuradio/block.h>
-#include <gnuradio/qtgui/api.h>
-#include <qapplication.h>
-#include <string>
-
-namespace gr {
-namespace qtgui {
-
-/*! FFT Histogram/Waterfall display widget for RFNoC fosphor display
- *
- * This block can consume one or two inputs, each vectors of unsigned 8-bit
- * numbers. The vector length is \p fft_bins for both inputs.
- *
- * The histogram display is a 2D display widget which does not only plot the
- * current (average) FFT, but also the max-hold values for the FFT, and a
- * histogram of the FFT (also averaged over time). For every FFT bin, it plots
- * a histogram of power level distributions.
- *
- * The first input contains the histogram data for the FFT histogram. It expects
- * data in the following order:
- * - \p pwr_bins vectors of length \p fft_bins containing the histogram data for
- * each FFT bin.
- * - One vector of length \p fft_bins containing the max values.
- * - One vector of length \p fft_bins containing the average values. After this
- * vector, we expect an end-of-frame tag. This means end-of-frame tags on this
- * input should be repeating every \p pwr_bins + 2 vectors.
- *
- * Averaging over time must be done by the upstream blocks. This block only does
- * the display, none of the calculations.
- *
- * The second input contains FFT data for a waterfall display. It is simply a
- * concatenation of FFT magnitude vectors (8-bit integers).
- *
- * \ingroup qtgui_blk
- */
-class QTGUI_API rfnoc_f15_display : virtual public gr::block
-{
-public:
- typedef std::shared_ptr<rfnoc_f15_display> sptr;
-
- /*! Create an instance of an RFNoC fosphor display
- *
- * \param fft_bins Number of FFT bins. This is also the vector length of the
- * inputs, and the x-axis dimension on both the histogram
- * plot and the waterfall plot (if enabled).
- * \param pwr_bins The number of power bins histograms per FFT bin. This is
- * also the y-axis dimension of the histogram plot. This
- * must match the input provided (see block description).
- * \param wf_lines The depth of the waterfall plot history (or the y-axis
- * dimension of waterfall plot).
- * \param parent The QWidget parent, if any.
- *
- * \brief Return a shared_ptr to a new instance of ettus::rfnoc_f15_display
- */
- static sptr make(const int fft_bins = 256,
- const int pwr_bins = 64,
- const int wf_lines = 512,
- QWidget* parent = nullptr);
-
- /*** Block API ***********************************************************/
- virtual void set_frequency_range(const double center_freq,
- const double samp_rate) = 0;
- virtual void set_waterfall(bool enabled) = 0;
- virtual void set_grid(bool enabled) = 0;
- virtual void set_palette(const std::string& name) = 0;
- virtual void set_frame_rate(int fps) = 0;
-
- /*** QT GUI Widget stuff *************************************************/
- virtual void exec_() = 0;
- virtual QWidget* qwidget() = 0;
-
- QApplication* d_qApplication;
-};
-
-} // namespace qtgui
-} // namespace gr
-
-#endif /* INCLUDED_QTGUI_RFNOC_F15_DISPLAY_H */
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index 6bd16741e..f5b0316d0 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -74,21 +74,6 @@ if(ENABLE_COMMON_PCH)
set(PRIVATE_LIBS common-precompiled-headers)
endif()
-if(ENABLE_GR_QTGUI_OPENGL)
- qt5_add_resources(RFNOC_F15_RC_SRCS rfnoc_f15.qrc)
- list(APPEND QTGUI_SOURCES
- axis.c
- rfnoc_f15_display_impl.cc
- QRfnocF15ColorMapper.cc
- QRfnocF15Surface.cc
- ${RFNOC_F15_RC_SRCS}
- )
- find_package(OpenGL)
- list(APPEND PRIVATE_LIBS
- Qt5::OpenGL
- OpenGL::GL
- )
-endif()
add_library(
gnuradio-qtgui
@@ -135,15 +120,7 @@ qt5_wrap_cpp(
${qtgui_mod_includedir}/ConstellationDisplayPlot.h
${qtgui_mod_includedir}/HistogramDisplayPlot.h
${qtgui_mod_includedir}/VectorDisplayPlot.h
- edit_box_msg_impl.h
- )
-if(ENABLE_GR_QTGUI_OPENGL)
- qt5_wrap_cpp(
- qtgui_moc_sources
- QRfnocF15Surface.h
- QRfnocF15ColorMapper.h
- )
-endif()
+ edit_box_msg_impl.h)
target_sources(gnuradio-qtgui PRIVATE ${qtgui_moc_sources})
qt5_wrap_ui(qtgui_ui_hdrs spectrumdisplayform.ui)
target_sources(gnuradio-qtgui PRIVATE ${qtgui_ui_hdrs})
diff --git a/gr-qtgui/lib/QRfnocF15ColorMapper.cc b/gr-qtgui/lib/QRfnocF15ColorMapper.cc
deleted file mode 100644
index 8ebd7f917..000000000
--- a/gr-qtgui/lib/QRfnocF15ColorMapper.cc
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2013-2015 Sylvain Munaut
- * Copyright 2015 Ettus Research
- * Copyright 2020 Ettus Research, A National Instruments Brand.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#include "QRfnocF15ColorMapper.h"
-#include <QGLContext>
-#include <array>
-#include <memory>
-#include <sstream>
-
-namespace gr {
-namespace qtgui {
-
-QRfnocF15ColorMapper::QRfnocF15ColorMapper(QObject* parent) : QObject(parent)
-{
- /* Shader init */
- d_shader = new QGLShaderProgram(this);
-
- d_shader->addShaderFromSourceCode(
- QGLShader::Fragment,
- "uniform sampler2D cmap;\n"
- "uniform sampler2D tex;\n"
- "uniform vec2 range;\n"
- "\n"
- "void main()\n"
- "{\n"
- " float intensity = texture2D(tex, gl_TexCoord[0].st).x;\n"
- " float map = (intensity + range.y) * range.x;\n"
- " vec4 color = texture2D(cmap, vec2(map, 0.0));\n"
- " gl_FragColor = color;\n"
- "}\n");
- d_shader->link();
-
- d_u_cmap = d_shader->uniformLocation("cmap");
- d_u_tex = d_shader->uniformLocation("tex");
- d_u_range = d_shader->uniformLocation("range");
-
- /* Load default set */
- QFile f(":/rfnoc_f15/palettes.txt");
- loadFromFile(f);
- initializeGLFunctions();
-}
-
-int QRfnocF15ColorMapper::loadFromFile(QFile& file)
-{
- std::unique_ptr<QLinearGradient> gradient;
- std::string name;
- int kp = -1;
-
- /* Make sure it's open */
- if (!file.isOpen())
- file.open(QFile::ReadOnly);
-
- /* Scan until the end */
- std::stringstream ss;
- while (!file.atEnd()) {
- /* Grab a line */
- QByteArray line = file.readLine().simplified();
-
- /* Skip comments and empty lines */
- if (line.isEmpty() || line.startsWith('#'))
- continue;
-
- /* Are we in a palette ? */
- if (kp < 0) {
- ss.str(line.toStdString());
- ss >> kp;
- ss >> name;
- ss.clear();
-
- if (kp) {
- gradient = std::make_unique<QLinearGradient>();
- }
- } else if (kp == 0) {
- /* Create palette */
- QString filename = line;
- QPixmap pixmap(filename);
-
- addPalette(name, pixmap);
-
- /* Release name & prepare for next */
- name.clear();
-
- kp = -1;
- } else {
- std::array<float, 4> f;
-
- /* Read data point */
- ss.str(line.toStdString());
- for (auto& val : f) {
- ss >> val;
- }
- ss.clear();
-
- // gradient should already be initialized in this else clause
- gradient->setColorAt(f[0], QColor::fromRgbF(f[1], f[2], f[3]));
- /* Is it over ? */
- if (!--kp) {
- /* Add the newly created palette */
- addPalette(name, *gradient);
-
- kp = -1;
- }
- }
- }
-
- return 0;
-}
-
-bool QRfnocF15ColorMapper::addPalette(std::string name, QLinearGradient& gradient)
-{
- /* Configure the gradient */
- gradient.setStart(0, 0);
- gradient.setFinalStop(1, 0);
- gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
-
- /* Draw it on a pixmap */
- QPixmap pixmap(256, 1);
- pixmap.fill(Qt::transparent);
-
- QPainter painter(&pixmap);
- painter.fillRect(0, 0, 256, 1, gradient);
-
- /* Create it from pixmap */
- return addPalette(name, pixmap);
-}
-
-bool QRfnocF15ColorMapper::addPalette(std::string name, QPixmap& pixmap)
-{
- /* Convert to an OpenGL texture */
- /* Note: We use TEXTURE_2D because 1D isn't really supported by Qt
- * and it's also not in OpenGL ES */
- QGLContext* ctx = (QGLContext*)QGLContext::currentContext();
- GLuint tex_id = ctx->bindTexture(pixmap, GL_TEXTURE_2D);
-
- /* Configure behavior */
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- /* Insert new texture (remove old one if needed) */
- if (d_palettes.count(name))
- ctx->deleteTexture(d_palettes[name]);
-
- d_palettes[name] = tex_id;
-
- return true;
-}
-
-void QRfnocF15ColorMapper::drawScale(
- std::string name, float x0, float y0, float x1, float y1)
-{
- /* Enable texture-2D */
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, d_palettes[name]);
- glEnable(GL_TEXTURE_2D);
-
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-
- /* Draw QUAD */
- glBegin(GL_QUADS);
- glTexCoord2f(0.0f, 0.0f);
- glVertex2f(x0, y0);
- glTexCoord2f(0.0f, 0.0f);
- glVertex2f(x1, y0);
- glTexCoord2f(1.0f, 0.0f);
- glVertex2f(x1, y1);
- glTexCoord2f(1.0f, 0.0f);
- glVertex2f(x0, y1);
- glEnd();
-
- /* Disable texturing */
- glDisable(GL_TEXTURE_2D);
-}
-
-void QRfnocF15ColorMapper::enable(std::string name, GLuint tex_id)
-{
- /* Enable shader */
- d_shader->bind();
-
- /* Texture unit 0: Main texture */
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, tex_id);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-
- d_shader->setUniformValue(d_u_tex, 0);
-
- /* Texture unit 1: Palette texture */
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, d_palettes[name]);
- d_shader->setUniformValue(d_u_cmap, 1);
-
- /* Range definition */
- d_shader->setUniformValue(d_u_range, 1.0f, 0.00f);
-}
-
-void QRfnocF15ColorMapper::disable()
-{
- glActiveTexture(GL_TEXTURE0);
- d_shader->release();
-}
-
-} // namespace qtgui
-} // namespace gr
diff --git a/gr-qtgui/lib/QRfnocF15ColorMapper.h b/gr-qtgui/lib/QRfnocF15ColorMapper.h
deleted file mode 100644
index d51b8c330..000000000
--- a/gr-qtgui/lib/QRfnocF15ColorMapper.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2013-2015 Sylvain Munaut
- * Copyright 2015 Ettus Research
- * Copyright 2020 Ettus Research, A National Instruments Brand.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#ifndef INCLUDED_QTGUI_QRFNOCF15COLORMAPPER_H
-#define INCLUDED_QTGUI_QRFNOCF15COLORMAPPER_H
-
-#include <QFile>
-#include <QGLFunctions>
-#include <QGLShaderProgram>
-#include <QGradient>
-#include <QObject>
-#include <QPixmap>
-
-#include <map>
-#include <string>
-
-namespace gr {
-namespace qtgui {
-
-class QRfnocF15ColorMapper : public ::QObject, protected ::QGLFunctions
-{
- Q_OBJECT
-
-public:
- QRfnocF15ColorMapper(QObject* parent = NULL);
-
- int loadFromFile(QFile& file);
- bool addPalette(std::string name, QLinearGradient& gradient);
- bool addPalette(std::string name, QPixmap& pixmap);
-
- void drawScale(std::string name, float x0, float y0, float x1, float y1);
-
- void enable(std::string name, GLuint tex_id);
- void disable();
-
-private:
- QGLShaderProgram* d_shader;
-
- int d_u_cmap;
- int d_u_tex;
- int d_u_range;
-
- std::map<std::string, GLuint> d_palettes;
-};
-
-} // namespace qtgui
-} // namespace gr
-
-#endif /* INCLUDED_QTGUI_QRFNOCF15COLORMAPPER_H */
diff --git a/gr-qtgui/lib/QRfnocF15Surface.cc b/gr-qtgui/lib/QRfnocF15Surface.cc
deleted file mode 100644
index 7cb48873f..000000000
--- a/gr-qtgui/lib/QRfnocF15Surface.cc
+++ /dev/null
@@ -1,655 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2013-2015 Sylvain Munaut
- * Copyright 2015 Ettus Research
- * Copyright 2020 Ettus Research, A National Instruments Brand.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#include "QRfnocF15ColorMapper.h"
-#include "QRfnocF15Surface.h"
-
-#include <cstdio>
-#include <cstring>
-
-#include <QFont>
-#include <QPainter>
-#include <QPixmap>
-
-
-namespace gr {
-namespace qtgui {
-
-QRfnocF15Surface::QRfnocF15Surface(int fft_bins,
- int pwr_bins,
- int wf_lines,
- QWidget* parent)
- : QGLWidget(parent),
- d_fft_bins(fft_bins),
- d_pwr_bins(pwr_bins),
- d_wf_lines(wf_lines),
- d_grid_enabled(true),
- d_palette("iron")
-{
- setFocusPolicy(Qt::StrongFocus);
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-
- memset(&d_frame, 0, sizeof(d_frame));
- memset(&d_wf, 0, sizeof(d_wf));
- memset(&d_layout, 0, sizeof(d_layout));
-
- d_frame.vbo_buf = new float[4 * fft_bins]();
- d_wf.data_buf = new uint8_t[wf_lines * fft_bins]();
-
- setFrequencyRange(0.0, 0.0);
-}
-
-QRfnocF15Surface::~QRfnocF15Surface()
-{
- delete[] d_frame.vbo_buf;
- delete[] d_wf.data_buf;
-}
-
-
-/* -------------------------------------------------------------------- */
-/* Overloaded GL functions */
-/* -------------------------------------------------------------------- */
-
-void QRfnocF15Surface::initializeGL()
-{
- initializeGLFunctions();
-
- /* Init frame texture */
- glGenTextures(1, &d_frame.tex);
-
- glBindTexture(GL_TEXTURE_2D, d_frame.tex);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
-
- glTexImage2D(GL_TEXTURE_2D,
- 0,
- GL_R8,
- d_fft_bins,
- d_pwr_bins,
- 0,
- GL_RED,
- GL_UNSIGNED_BYTE,
- NULL);
-
- /* Init frame VBO */
- glGenBuffers(1, &d_frame.vbo);
-
- glBindBuffer(GL_ARRAY_BUFFER, d_frame.vbo);
-
- glBufferData(
- GL_ARRAY_BUFFER, 2 * sizeof(float) * 2 * d_fft_bins, NULL, GL_DYNAMIC_DRAW);
-
- /* Init waterfall texture */
- glGenTextures(1, &d_wf.tex);
-
- glBindTexture(GL_TEXTURE_2D, d_wf.tex);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-
- glTexImage2D(GL_TEXTURE_2D,
- 0,
- GL_R8,
- d_fft_bins,
- d_wf_lines,
- 0,
- GL_RED,
- GL_UNSIGNED_BYTE,
- NULL);
-
- /* Color map */
- d_cmap = new QRfnocF15ColorMapper(this);
-}
-
-void QRfnocF15Surface::resizeGL(int width, int height)
-{
- /* Setup matrix to map GL coord to exact pixels */
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0.0, (double)width, 0.0, (double)height, -1.0, 1.0);
-
- /* Viewport on the whole area */
- glViewport(0, 0, width, height);
-
- /* Update layout */
- d_layout.width = width;
- d_layout.height = height;
- d_layout.dirty = true;
-}
-
-void QRfnocF15Surface::paintGL()
-{
- /* If no data, abort early */
- if (!d_frame.data)
- return;
-
- /* Upload texture if needed */
- if (d_frame.dirty) {
- uploadFrameData();
- }
-
- if (d_wf.dirty) {
- uploadWaterfallData();
- }
-
- /* Refresh layout if needed */
- if (d_layout.dirty) {
- refreshLayout();
- }
-
- /* Clear everything */
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- glClear(GL_COLOR_BUFFER_BIT);
-
- /* Draw the various UI element */
- drawHistogram();
- drawHistogramIntensityScale();
- drawSpectrum();
- drawGrid();
-
- if (d_layout.wf_enabled) {
- drawWaterfall();
- drawWaterfallIntensityScale();
- }
-
- drawMargins();
-}
-
-
-/* -------------------------------------------------------------------- */
-/* Public API */
-/* -------------------------------------------------------------------- */
-
-void QRfnocF15Surface::setFrequencyRange(const double center_freq, const double span)
-{
- freq_axis_build(&d_freq_axis, center_freq, span, 10);
- d_layout.dirty = true; // FIXME more fine grain refresh
-}
-
-void QRfnocF15Surface::setWaterfall(bool enabled)
-{
- d_layout.wf_enabled = enabled;
- d_layout.dirty = true;
-}
-
-void QRfnocF15Surface::setGrid(bool enabled) { d_grid_enabled = enabled; }
-
-void QRfnocF15Surface::setPalette(std::string name) { d_palette = name; }
-
-void QRfnocF15Surface::sendFrame(void* frame, int frame_len)
-{
- d_frame.data = frame;
- d_frame.dirty = true;
- QMetaObject::invokeMethod(this, "updateGL");
-}
-
-void QRfnocF15Surface::sendWaterfall(const uint8_t* wf, int n)
-{
- int m;
-
- // Limit to max height
- if (n > d_wf_lines) {
- wf += d_fft_bins * (n - d_wf_lines);
- n = d_wf_lines;
- }
-
- // Copy the new data
- while (n) {
- m = n > (d_wf_lines - d_wf.pos) ? (d_wf_lines - d_wf.pos) : n;
- memcpy(&d_wf.data_buf[d_wf.pos * d_fft_bins], wf, m * d_fft_bins);
- d_wf.pos = (d_wf.pos + m) % d_wf_lines;
- wf += m * d_fft_bins;
- n -= m;
- }
-
- // Force refresh
- d_wf.dirty = true;
-}
-
-
-/* -------------------------------------------------------------------- */
-/* Private helpers */
-/* -------------------------------------------------------------------- */
-
-void QRfnocF15Surface::drawHistogram()
-{
- float x[2], y[2];
- float e = 0.5f / d_fft_bins;
-
- /* Draw Histogram texture */
- d_cmap->enable(d_palette, d_frame.tex);
-
- x[0] = d_layout.x[1];
- x[1] = d_layout.x[2];
- y[0] = d_layout.y[3];
- y[1] = d_layout.y[4];
-
- glBegin(GL_QUADS);
- glTexCoord2d(0.0f + e, -0.038f);
- glVertex2d(x[0], y[0]);
- glTexCoord2d(1.0f + e, -0.038f);
- glVertex2d(x[1], y[0]);
- glTexCoord2d(1.0f + e, 1.000f);
- glVertex2d(x[1], y[1]);
- glTexCoord2d(0.0f + e, 1.000f);
- glVertex2d(x[0], y[1]);
- glEnd();
-
- d_cmap->disable();
-}
-
-void QRfnocF15Surface::drawHistogramIntensityScale()
-{
- d_cmap->drawScale(d_palette,
- d_layout.x[2] + 2.0f,
- d_layout.y[3],
- d_layout.x[2] + 10.0f,
- d_layout.y[4]);
-}
-
-void QRfnocF15Surface::drawSpectrum()
-{
- /* Setup the 2D transform */
- glPushMatrix();
-
- glTranslatef(d_layout.x[1], d_layout.y[3], 0.0f);
-
- glScalef(d_layout.x[2] - d_layout.x[1], d_layout.y[4] - d_layout.y[3], 1.0f);
-
- glScalef(1.0f / d_fft_bins, 0.9632f / 256.0f, 1.0f);
-
- glTranslatef(0.0f,
- 9.4208f, /* (100 - 96.32) / 100 * 256 */
- 0.0f);
-
- /* Setup GL state */
- glBindBuffer(GL_ARRAY_BUFFER, d_frame.vbo);
- glVertexPointer(2, GL_FLOAT, 0, 0);
-
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_LINE_SMOOTH);
- glLineWidth(1.0f);
-
- /* Draw Max-Hold */
- glColor4f(1.0f, 0.0f, 0.0f, 0.75f);
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glDrawArrays(GL_LINE_STRIP, 0, d_fft_bins);
- glDisableClientState(GL_VERTEX_ARRAY);
-
- /* Draw Live */
- glColor4f(1.0f, 1.0f, 1.0f, 0.75f);
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glDrawArrays(GL_LINE_STRIP, d_fft_bins, d_fft_bins);
- glDisableClientState(GL_VERTEX_ARRAY);
-
- /* Cleanup GL state */
- glDisable(GL_BLEND);
-
- /* Restore */
- glPopMatrix();
-}
-
-void QRfnocF15Surface::drawGrid()
-{
- float x[2], y[2];
- int i;
-
- if (!d_grid_enabled)
- return;
-
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glBegin(GL_LINES);
- glColor4f(0.02f, 0.02f, 0.02f, 0.5f);
-
- /* Vertical div */
- x[0] = d_layout.x[1];
- x[1] = d_layout.x[2];
-
- for (i = 0; i < 11; i++) {
- y[0] = d_layout.y[3] + i * d_layout.y_div + 0.5f;
-
- glVertex2f(x[0], y[0]);
- glVertex2f(x[1], y[0]);
- }
-
- /* Horizontal div */
- y[0] = d_layout.y[3];
- y[1] = d_layout.y[4];
-
- for (i = 0; i < 11; i++) {
- x[0] = d_layout.x[1] + i * d_layout.x_div + 0.5f;
-
- glVertex2f(x[0], y[0]);
- glVertex2f(x[0], y[1]);
- }
-
- glEnd();
- glDisable(GL_BLEND);
-}
-
-void QRfnocF15Surface::drawWaterfall()
-{
- float x[2], y[2];
- float e = 0.5f / d_fft_bins;
- float v[2];
-
- /* Draw Waterfall texture */
- d_cmap->enable(d_palette, d_wf.tex);
-
- x[0] = d_layout.x[1];
- x[1] = d_layout.x[2];
- y[0] = d_layout.y[1];
- y[1] = d_layout.y[2];
-
- v[0] = (float)(d_wf.pos) / (float)(d_wf_lines);
- v[1] = v[0] + 1.0f;
-
- glBegin(GL_QUADS);
- glTexCoord2d(0.0f + e, v[0]);
- glVertex2d(x[0], y[0]);
- glTexCoord2d(1.0f + e, v[0]);
- glVertex2d(x[1], y[0]);
- glTexCoord2d(1.0f + e, v[1]);
- glVertex2d(x[1], y[1]);
- glTexCoord2d(0.0f + e, v[1]);
- glVertex2d(x[0], y[1]);
- glEnd();
-
- d_cmap->disable();
-}
-
-void QRfnocF15Surface::drawWaterfallIntensityScale()
-{
- d_cmap->drawScale(d_palette,
- d_layout.x[2] + 2.0f,
- d_layout.y[1],
- d_layout.x[2] + 10.0f,
- d_layout.y[2]);
-}
-
-void QRfnocF15Surface::drawMargins()
-{
- float x[2], y[2];
-
- glActiveTexture(GL_TEXTURE0);
- glEnable(GL_TEXTURE_2D);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
-
- x[0] = d_layout.x[0];
- y[0] = d_layout.y[2];
-
- glBindTexture(GL_TEXTURE_2D, d_layout.pwr_tex);
-
- x[1] = d_layout.x[1];
- y[1] = d_layout.y[5];
-
- glBegin(GL_QUADS);
- glTexCoord2d(0.0f, 0.0f);
- glVertex2d(x[0], y[0]);
- glTexCoord2d(1.0f, 0.0f);
- glVertex2d(x[1], y[0]);
- glTexCoord2d(1.0f, 1.0f);
- glVertex2d(x[1], y[1]);
- glTexCoord2d(0.0f, 1.0f);
- glVertex2d(x[0], y[1]);
- glEnd();
-
- glBindTexture(GL_TEXTURE_2D, d_layout.freq_tex);
-
- x[1] = d_layout.x[3];
- y[1] = d_layout.y[3];
-
- glBegin(GL_QUADS);
- glTexCoord2d(0.0f, 0.0f);
- glVertex2d(x[0], y[0]);
- glTexCoord2d(1.0f, 0.0f);
- glVertex2d(x[1], y[0]);
- glTexCoord2d(1.0f, 1.0f);
- glVertex2d(x[1], y[1]);
- glTexCoord2d(0.0f, 1.0f);
- glVertex2d(x[0], y[1]);
- glEnd();
-
- glDisable(GL_BLEND);
- glDisable(GL_TEXTURE_2D);
-}
-
-void QRfnocF15Surface::uploadFrameData()
-{
- int i;
-
- /* Upload new texture */
- glBindTexture(GL_TEXTURE_2D, d_frame.tex);
-
- glTexSubImage2D(GL_TEXTURE_2D,
- 0,
- 0,
- 0,
- d_fft_bins,
- d_pwr_bins,
- GL_RED,
- GL_UNSIGNED_BYTE,
- d_frame.data);
-
- /* Compute the new VBO data */
- for (i = 0; i < d_fft_bins; i++) {
- uint8_t* data = (uint8_t*)d_frame.data + (d_fft_bins * d_pwr_bins);
- int maxh_idx = 2 * i;
- int live_idx = 2 * (i + d_fft_bins);
-
- d_frame.vbo_buf[maxh_idx] = i;
- d_frame.vbo_buf[maxh_idx + 1] = data[i];
-
- d_frame.vbo_buf[live_idx] = i;
- d_frame.vbo_buf[live_idx + 1] = data[i + d_fft_bins];
- }
-
- /* Upload new VBO data */
- glBindBuffer(GL_ARRAY_BUFFER, d_frame.vbo);
-
- glBufferData(GL_ARRAY_BUFFER,
- 2 * sizeof(float) * 2 * d_fft_bins,
- d_frame.vbo_buf,
- GL_DYNAMIC_DRAW);
-
- /* Data is fresh */
- d_frame.dirty = false;
-}
-
-void QRfnocF15Surface::uploadWaterfallData()
-{
- glBindTexture(GL_TEXTURE_2D, d_wf.tex);
-
- glTexSubImage2D(GL_TEXTURE_2D,
- 0,
- 0,
- 0,
- d_fft_bins,
- d_wf_lines,
- GL_RED,
- GL_UNSIGNED_BYTE,
- d_wf.data_buf);
-}
-
-void QRfnocF15Surface::refreshPowerAxis()
-{
- char buf[32];
- int i;
-
- /* Release previous texture */
- if (d_layout.pwr_tex)
- deleteTexture(d_layout.pwr_tex);
-
- /* Create a pixmap of right size */
- QPixmap pixmap((int)(d_layout.x[1] - d_layout.x[0]),
- (int)(d_layout.y[5] - d_layout.y[2]));
- pixmap.fill(Qt::transparent);
-
- QPainter painter(&pixmap);
- painter.setPen(QColor(255, 255, 255, 255));
-
- QFont font("Monospace");
- font.setPixelSize(10);
- painter.setFont(font);
-
- /* Paint labels */
- for (i = 0; i < 11; i++) {
- int yv = (int)(d_layout.y[5] - d_layout.y[3] - i * d_layout.y_div);
-
- snprintf(buf, sizeof(buf) - 1, "%d", (i - 10) * 10);
- buf[sizeof(buf) - 1] = 0;
-
- painter.drawText(0,
- yv - 10,
- d_layout.x[1] - d_layout.x[0] - 5,
- 20,
- Qt::AlignRight | Qt::AlignVCenter,
- buf);
- }
-
- /* Create texture */
- d_layout.pwr_tex = bindTexture(pixmap);
-}
-
-void QRfnocF15Surface::refreshFrequencyAxis()
-{
- char buf[32];
- int n_div, i;
-
- /* Release previous texture */
- if (d_layout.freq_tex)
- deleteTexture(d_layout.freq_tex);
-
- /* Create a pixmap of right size */
- QPixmap pixmap((int)(d_layout.x[3] - d_layout.x[0]),
- (int)(d_layout.y[3] - d_layout.y[2]));
- pixmap.fill(Qt::transparent);
-
- QPainter painter(&pixmap);
- painter.setPen(QColor(255, 255, 255, 255));
-
- QFont font("Monospace");
- font.setPixelSize(10);
- painter.setFont(font);
-
- /* Paint labels */
- n_div = 10;
-
- for (i = 0; i <= n_div; i++) {
- int xv = (int)(d_layout.x[1] - d_layout.x[0] + i * d_layout.x_div);
- int xl, xw;
- int flags;
-
- freq_axis_render(&d_freq_axis, buf, i - (n_div >> 1));
- buf[sizeof(buf) - 1] = 0;
-
- if (i == 0) {
- xl = xv - 10;
- xw = 60;
- flags = Qt::AlignLeft | Qt::AlignVCenter;
- } else if (i == n_div) {
- xl = xv - 50;
- xw = 60;
- flags = Qt::AlignRight | Qt::AlignVCenter;
- } else {
- xl = xv - 30;
- xw = 60;
- flags = Qt::AlignHCenter | Qt::AlignVCenter;
- }
-
- painter.drawText(xl, 0, xw, (int)(d_layout.y[3] - d_layout.y[2]), flags, buf);
- }
-
- /* Create texture */
- d_layout.freq_tex = bindTexture(pixmap);
-}
-
-void QRfnocF15Surface::refreshLayout()
-{
- int rsvd_pos[3], rsvd, avail, n_div, div, over, over_pos[3];
-
- /* Split the X space */
- rsvd_pos[0] = 40;
- rsvd_pos[1] = 20;
-
- rsvd = rsvd_pos[0] + rsvd_pos[1];
- avail = d_layout.width - rsvd - 1;
- div = avail / 10;
- over = avail - 10 * div;
-
- over_pos[0] = over / 2;
- over_pos[1] = over - over_pos[0];
-
- d_layout.x_div = (float)div;
- d_layout.x[0] = 0.0f;
- d_layout.x[1] = (float)(rsvd_pos[0] + over_pos[0]);
- d_layout.x[2] = d_layout.x[1] + 10.0f * div + 1.0f;
- d_layout.x[3] = d_layout.width;
-
- /* Split the Y space */
- rsvd_pos[0] = d_layout.wf_enabled ? 10 : 0;
- rsvd_pos[1] = 20;
- rsvd_pos[2] = 10;
-
- rsvd = rsvd_pos[0] + rsvd_pos[1] + rsvd_pos[2];
- avail = d_layout.height - rsvd - (d_layout.wf_enabled ? 2 : 1);
- n_div = d_layout.wf_enabled ? 20 : 10;
- div = avail / n_div;
- over = avail - n_div * div;
-
- if (d_layout.wf_enabled) {
- over_pos[0] = over / 3;
- over_pos[1] = over - (2 * over_pos[0]);
- over_pos[2] = over_pos[0];
- } else {
- over_pos[0] = 0;
- over_pos[1] = over / 2;
- over_pos[2] = over - over_pos[1];
- }
-
- d_layout.y_div = (float)div;
-
- d_layout.y[0] = 0.0f;
-
- if (d_layout.wf_enabled) {
- d_layout.y[1] = d_layout.y[0] + (float)(rsvd_pos[0] + over_pos[0]);
- d_layout.y[2] = d_layout.y[1] + 10.0f * div + 1.0f;
- } else {
- d_layout.y[1] = 0.0f;
- d_layout.y[2] = 0.0f;
- }
-
- d_layout.y[3] = d_layout.y[2] + (float)(rsvd_pos[1] + over_pos[1]);
- d_layout.y[4] = d_layout.y[3] + 10.0f * div + 1.0f;
-
- d_layout.y[5] = d_layout.height;
-
- /* Refresh axis */
- refreshPowerAxis();
- refreshFrequencyAxis();
-
- /* All refreshed now */
- d_layout.dirty = false;
-}
-
-} // namespace qtgui
-} // namespace gr
diff --git a/gr-qtgui/lib/QRfnocF15Surface.h b/gr-qtgui/lib/QRfnocF15Surface.h
deleted file mode 100644
index 29243d4af..000000000
--- a/gr-qtgui/lib/QRfnocF15Surface.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2015 Ettus Research
- * Copyright 2020 Ettus Research, A National Instruments Brand.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#ifndef INCLUDED_QTGUI_QRFNOCF15SURFACE_H
-#define INCLUDED_QTGUI_QRFNOCF15SURFACE_H
-
-#include <QGLFunctions>
-#include <QGLWidget>
-
-#include <string>
-
-extern "C" {
-#include "axis.h"
-}
-
-namespace gr {
-namespace qtgui {
-
-class QRfnocF15ColorMapper;
-
-class QRfnocF15Surface : public ::QGLWidget, protected ::QGLFunctions
-{
- Q_OBJECT
-
-protected:
- void initializeGL() override;
- void resizeGL(int width, int height) override;
- void paintGL() override;
-
-public:
- QRfnocF15Surface(int fft_bins, int pwr_bins, int wf_lines, QWidget* parent);
- ~QRfnocF15Surface() override;
-
- void setFrequencyRange(const double center_freq, const double span);
- void setWaterfall(bool enabled);
- void setGrid(bool enabled);
- void setPalette(std::string name);
- void sendFrame(void* frame, int frame_len);
- void sendWaterfall(const uint8_t* wf, int n);
-
-private:
- void drawHistogram();
- void drawHistogramIntensityScale();
- void drawSpectrum();
- void drawGrid();
- void drawWaterfall();
- void drawWaterfallIntensityScale();
- void drawMargins();
- void uploadFrameData();
- void uploadWaterfallData();
- void refreshPowerAxis();
- void refreshFrequencyAxis();
- void refreshLayout();
-
- int d_fft_bins;
- int d_pwr_bins;
- int d_wf_lines;
-
- bool d_grid_enabled;
- std::string d_palette;
-
- struct {
- bool dirty;
- void* data;
- GLuint tex;
- GLuint vbo;
- float* vbo_buf;
- } d_frame;
-
- struct {
- bool dirty;
- int pos;
- uint8_t* data_buf;
- GLuint tex;
- } d_wf;
-
- struct {
- bool dirty;
- int width;
- int height;
-
- bool wf_enabled;
-
- float x[4];
- float y[6];
- float x_div;
- float y_div;
-
- GLuint pwr_tex;
- GLuint freq_tex;
- } d_layout;
-
- QRfnocF15ColorMapper* d_cmap;
-
- struct freq_axis d_freq_axis;
-};
-
-} // namespace qtgui
-} // namespace gr
-
-#endif /* INCLUDED_QTGUI_QRFNOCF15SURFACE_H */
diff --git a/gr-qtgui/lib/axis.c b/gr-qtgui/lib/axis.c
deleted file mode 100644
index 234889095..000000000
--- a/gr-qtgui/lib/axis.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * axis.c
- *
- * Logic to deal with various axises
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-/*! \addtogroup axis
- * @{
- */
-
-/*! \file axis.c
- * \brief Logic to deal with various axises
- */
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "axis.h"
-
-
-#define FX_MODE_COUNT 0
-#define FX_MODE_RELATIVE 1
-#define FX_MODE_ABSOLUTE 2
-
-
-static double _si_scaling(double val, int max_num, char* prefix, int* exp)
-{
- const char prefixes[5] = { ' ', 'k', 'M', 'G', 'T' };
- int exponent = log10f(fabs(val));
- int d = exponent >= max_num ? ((exponent - max_num + 3) / 3) : 0;
-
- if (prefix)
- *prefix = prefixes[d];
-
- if (exp)
- *exp = d * 3;
-
- return val / powf(10.0, d * 3);
-}
-
-static int _num_decimals(double val)
-{
- int c;
- double v;
-
- for (c = 0; c < 22; c++) {
- v = val * pow(10, c);
- if (fabs(v - round(v)) == 0.0)
- return c;
- }
-
- return -1;
-}
-
-
-void freq_axis_build(struct freq_axis* fx, double center, double span, int n_div)
-{
- /* Basic info */
- fx->center = center;
- fx->span = span;
- fx->step = span / n_div;
-
- /* Select mode of operation */
- if (span == 0.0) {
- fx->mode = FX_MODE_COUNT;
- } else if (center == 0.0) {
- fx->mode = FX_MODE_RELATIVE;
- } else if (floor(log10f(fx->step)) < (floor(log10f(fx->center)) - 4)) {
- fx->mode = FX_MODE_RELATIVE;
- } else {
- fx->mode = FX_MODE_ABSOLUTE;
- }
-
- /* Select display format for abolute frequencies */
- if (center != 0.0) {
- double min_freq, max_freq, big_freq;
- char prefix[2] = { 0, 0 };
- int exp, x, y, z;
-
- max_freq = fx->center + (span / 2.0);
- min_freq = fx->center - (span / 2.0);
-
- big_freq = (fabs(max_freq) > fabs(min_freq)) ? fabs(max_freq) : fabs(min_freq);
-
- _si_scaling(big_freq, 4, prefix, &exp);
-
- if (prefix[0] == ' ')
- prefix[0] = '\0';
-
- fx->abs_scale = 1.0 / powf(10.0, exp);
-
- x = (int)floor(log10f(big_freq)) - exp + 1;
- y = _num_decimals(fx->center * fx->abs_scale);
- z = _num_decimals(fx->step * fx->abs_scale);
-
- if (z > y)
- y = z;
-
- if (x + y > 6)
- y = 6 - x;
-
- sprintf(fx->abs_fmt, "%%.%dlf%s", y, prefix);
- }
-
- /* Select display format for relative mode */
- if (fx->mode == FX_MODE_RELATIVE) {
- double max_dev = fx->step * 5;
- char prefix[2] = { 0, 0 };
- int exp, x, y;
-
- _si_scaling(max_dev, 3, prefix, &exp);
-
- if (prefix[0] == ' ')
- prefix[0] = '\0';
-
- fx->rel_step = fx->step / powf(10.0, exp);
-
- x = (int)floor(log10f(max_dev)) - exp + 1;
- y = _num_decimals(fx->rel_step);
-
- if (x + y > 4)
- y = 4 - x;
-
- sprintf(fx->rel_fmt, "%%+.%dlf%s", y, prefix);
- }
-}
-
-void freq_axis_render(struct freq_axis* fx, char* str, int step)
-{
- /* Special case: count mode */
- if (step && (fx->mode == FX_MODE_COUNT)) {
- sprintf(str, "%+d", step);
- return;
- }
-
- /* Special case: no center frequency */
- if (!step && (fx->center == 0.0)) {
- sprintf(str, "0");
- return;
- }
-
- /* Relative case */
- if (step && (fx->mode == FX_MODE_RELATIVE)) {
- sprintf(str, fx->rel_fmt, step * fx->rel_step);
- return;
- }
-
- /* Normal full absolute frequency */
- sprintf(str, fx->abs_fmt, (fx->center + step * fx->step) * fx->abs_scale);
-}
-
-/*! @} */
diff --git a/gr-qtgui/lib/axis.h b/gr-qtgui/lib/axis.h
deleted file mode 100644
index 0a441a7f3..000000000
--- a/gr-qtgui/lib/axis.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * axis.h
- *
- * Logic to deal with various axises
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#ifndef __RFNOC_F15_AXIS_H__
-#define __RFNOC_F15_AXIS_H__
-
-/*! \defgroup axis RFNoC Fosphor axis-related functions
- * @{
- */
-
-/*! \file axis.h
- * \brief Logic to deal with various axises
- */
-
-struct freq_axis {
- double center;
- double span;
- double step;
- int mode;
- char abs_fmt[32];
- double abs_scale;
- char rel_fmt[32];
- double rel_step;
-};
-
-void freq_axis_build(struct freq_axis* fx, double center, double span, int n_div);
-void freq_axis_render(struct freq_axis* fx, char* str, int step);
-
-/*! @} */
-
-#endif /* __RFNOC_F15_AXIS_H__ */
diff --git a/gr-qtgui/lib/rfnoc_f15.qrc b/gr-qtgui/lib/rfnoc_f15.qrc
deleted file mode 100644
index 0ad067d31..000000000
--- a/gr-qtgui/lib/rfnoc_f15.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
-<file>rfnoc_f15/palettes.txt</file>
-<file>rfnoc_f15/pal_test.png</file>
-<file>rfnoc_f15/pal_iron.png</file>
-<file>rfnoc_f15/pal_rainbow.png</file>
-<file>rfnoc_f15/pal_cubehelix.png</file>
-</qresource>
-</RCC>
diff --git a/gr-qtgui/lib/rfnoc_f15/pal_cubehelix.png b/gr-qtgui/lib/rfnoc_f15/pal_cubehelix.png
deleted file mode 100644
index b51b5672f..000000000
--- a/gr-qtgui/lib/rfnoc_f15/pal_cubehelix.png
+++ /dev/null
Binary files differ
diff --git a/gr-qtgui/lib/rfnoc_f15/pal_iron.png b/gr-qtgui/lib/rfnoc_f15/pal_iron.png
deleted file mode 100644
index 54f9b55df..000000000
--- a/gr-qtgui/lib/rfnoc_f15/pal_iron.png
+++ /dev/null
Binary files differ
diff --git a/gr-qtgui/lib/rfnoc_f15/pal_rainbow.png b/gr-qtgui/lib/rfnoc_f15/pal_rainbow.png
deleted file mode 100644
index 6fe72bd93..000000000
--- a/gr-qtgui/lib/rfnoc_f15/pal_rainbow.png
+++ /dev/null
Binary files differ
diff --git a/gr-qtgui/lib/rfnoc_f15/pal_test.png b/gr-qtgui/lib/rfnoc_f15/pal_test.png
deleted file mode 100644
index 21d6ff802..000000000
--- a/gr-qtgui/lib/rfnoc_f15/pal_test.png
+++ /dev/null
Binary files differ
diff --git a/gr-qtgui/lib/rfnoc_f15/palettes.txt b/gr-qtgui/lib/rfnoc_f15/palettes.txt
deleted file mode 100644
index 55c75b581..000000000
--- a/gr-qtgui/lib/rfnoc_f15/palettes.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-# SDRangelove (histogram)
-9 sdrangelove_histogram
-0.00 0.115 0.075 0.150
-0.05 0.290 0.190 0.385
-0.06 0.000 0.165 0.660
-0.25 0.000 0.850 0.850
-0.40 0.000 1.000 0.415
-0.50 0.000 1.000 0.000
-0.75 1.000 1.000 0.000
-0.85 1.000 0.610 0.000
-1.00 1.000 0.450 0.450
-
-# SDRangelove (waterfall)
-5 sdrangelove_waterfall
-0.00 0.000 0.012 0.051
-0.20 0.000 0.240 0.240
-0.47 0.000 0.500 0.000
-0.73 0.745 0.745 0.000
-1.00 1.000 0.000 0.000
-
-# SDR# / prog
-13 prog
-0.00 0.00 0.00 0.12
-0.08 0.00 0.00 0.19
-0.17 0.00 0.00 0.31
-0.25 0.00 0.00 0.57
-0.33 0.11 0.56 1.00
-0.42 1.00 1.00 1.00
-0.50 1.00 1.00 0.00
-0.58 1.00 0.43 0.10
-0.67 1.00 0.00 0.00
-0.75 0.78 0.00 0.00
-0.83 0.62 0.00 0.00
-0.92 0.46 0.00 0.00
-1.00 0.29 0.00 0.00
-
-# Test
-0 test
-:/rfnoc_f15/pal_test.png
-
-# FLIR Iron
-0 iron
-:/rfnoc_f15/pal_iron.png
-
-# FLIR Rainbow
-0 rainbow
-:/rfnoc_f15/pal_rainbow.png
-
-# CubeHelix ( https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/ )
-0 cubehelix
-:/rfnoc_f15/pal_cubehelix.png
diff --git a/gr-qtgui/lib/rfnoc_f15_display_impl.cc b/gr-qtgui/lib/rfnoc_f15_display_impl.cc
deleted file mode 100644
index 7ecd458ee..000000000
--- a/gr-qtgui/lib/rfnoc_f15_display_impl.cc
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2015 Ettus Research
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "rfnoc_f15_display_impl.h"
-
-#include "QRfnocF15Surface.h"
-#include <QApplication>
-#include <QWidget>
-
-namespace gr {
-namespace qtgui {
-
-rfnoc_f15_display::sptr rfnoc_f15_display::make(const int fft_bins,
- const int pwr_bins,
- const int wf_lines,
- QWidget* parent)
-{
- return gnuradio::make_block_sptr<rfnoc_f15_display_impl>(
- fft_bins, pwr_bins, wf_lines, parent);
-}
-
-rfnoc_f15_display_impl::rfnoc_f15_display_impl(const int fft_bins,
- const int pwr_bins,
- const int wf_lines,
- QWidget* parent)
- : gr::block("rfnoc_f15_display",
- gr::io_signature::make(1, 2, fft_bins * sizeof(uint8_t)),
- gr::io_signature::make(0, 0, 0)),
- d_fft_bins(fft_bins),
- d_pwr_bins(pwr_bins),
- d_subframe_num(pwr_bins + 2)
-{
- /* Message Port output */
- message_port_register_out(pmt::mp("cfg"));
-
- /* Frame buffer */
- d_frame = new uint8_t[fft_bins * d_subframe_num];
-
- /* QT stuff */
- if (qApp != NULL) {
- d_qApplication = qApp;
- } else {
- d_qApplication = new QApplication(d_argc, &d_argv);
- }
-
- d_gui = new QRfnocF15Surface(fft_bins, pwr_bins, wf_lines, parent);
- d_gui->setFocusPolicy(Qt::StrongFocus);
- d_gui->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-}
-
-rfnoc_f15_display_impl::~rfnoc_f15_display_impl() { delete d_frame; }
-
-
-void rfnoc_f15_display_impl::set_frequency_range(const double center_freq,
- const double samp_rate)
-{
- pmt::pmt_t msg = pmt::make_dict();
-
- if ((d_center_freq == center_freq) && (d_samp_rate == samp_rate))
- return;
-
- if ((d_samp_rate != samp_rate) && (samp_rate > 0.0) && (d_frame_rate > 0)) {
- int decim;
-
- decim = (int)(d_samp_rate / (d_fft_bins * d_pwr_bins * d_frame_rate));
- if (decim < 2)
- decim = 2;
-
- msg = pmt::dict_add(msg, pmt::string_to_symbol("decim"), pmt::from_long(decim));
- }
-
- d_gui->setFrequencyRange(center_freq, samp_rate);
-
- d_center_freq = center_freq;
- d_samp_rate = samp_rate;
-
- msg = pmt::dict_add(msg, pmt::string_to_symbol("clear"), pmt::from_long(1));
-
- message_port_pub(pmt::mp("cfg"), msg);
-}
-
-void rfnoc_f15_display_impl::set_waterfall(bool enabled) { d_gui->setWaterfall(enabled); }
-
-void rfnoc_f15_display_impl::set_grid(bool enabled) { d_gui->setGrid(enabled); }
-
-void rfnoc_f15_display_impl::set_palette(const std::string& name)
-{
- d_gui->setPalette(name);
-}
-
-void rfnoc_f15_display_impl::set_frame_rate(int fps) { d_frame_rate = fps; }
-
-
-bool rfnoc_f15_display_impl::start()
-{
- pmt::pmt_t msg = pmt::make_dict();
-
- {
- int decim;
-
- decim = (int)(d_samp_rate / (d_fft_bins * d_pwr_bins * d_frame_rate));
- if (decim < 2)
- decim = 2;
-
- msg = pmt::dict_add(msg, pmt::string_to_symbol("decim"), pmt::from_long(decim));
- }
-
- msg = pmt::dict_add(msg, pmt::string_to_symbol("clear"), pmt::from_long(1));
-
- message_port_pub(pmt::mp("cfg"), msg);
- return true;
-}
-
-void rfnoc_f15_display_impl::forecast(int noutput_items,
- gr_vector_int& ninput_items_required)
-{
- /* Need at least one item */
- ninput_items_required[0] = 1;
-
- /* Don't wait on WaterFall data */
- if (ninput_items_required.size() > 1)
- ninput_items_required[1] = 0;
-}
-
-int rfnoc_f15_display_impl::general_work(int noutput_items,
- gr_vector_int& ninput_items,
- gr_vector_const_void_star& input_items,
- gr_vector_void_star& output_items)
-{
- int rv;
-
- /* Consume histogram */
- rv = _work_hist((const uint8_t*)input_items[0], ninput_items[0], 0);
-
- if (rv > 0)
- consume(0, rv);
-
- /* Consume waterfall, if available */
- if (ninput_items.size() > 1) {
- rv = _work_wf((const uint8_t*)input_items[1], ninput_items[1], 1);
-
- if (rv > 0) {
- consume(1, rv);
- }
- }
-
- return 0;
-}
-
-int rfnoc_f15_display_impl::_work_hist(const uint8_t* input, int n_items, int port)
-{
- static const pmt::pmt_t EOB_KEY = pmt::string_to_symbol("rx_eob");
- std::vector<tag_t> v;
- const uint64_t nR = nitems_read(port);
- // End-of-frame index, relative to the input buffer
- int pEOF;
-
- /* Anything to do ? */
- if (n_items < 1)
- return 0;
-
- /* Grab all tags available, we'll need them either way */
- get_tags_in_range(v, port, nR, nR + n_items, EOB_KEY);
-
- /* If not aligned we just search for EOF */
- if (!d_aligned) {
- /* No tags ? Drop all useless data while we wait for one */
- if (v.empty())
- return n_items;
-
- /* Start at zero right after the tag */
- d_subframe = 0;
- d_aligned = true;
-
- return v[0].offset - nR + 1;
- }
-
- /* Check alignment */
- pEOF = v.empty() ? -1 : (v[0].offset - nR);
-
- if (n_items >= (d_subframe_num - d_subframe)) {
- /* We have the end of the frame, must be an EOF on that */
- if (pEOF != (d_subframe_num - d_subframe - 1)) {
- d_aligned = false;
- return 0;
- }
- } else {
- /* We don't have the end of the frame yet, there can't be any EOF */
- if (pEOF >= 0) {
- d_aligned = false;
- return 0;
- }
- }
-
- /* Limit to expected frame boundary */
- if (n_items > (d_subframe_num - d_subframe))
- n_items = d_subframe_num - d_subframe;
-
- /* Copy the data */
- memcpy(&d_frame[d_fft_bins * d_subframe], input, n_items * d_fft_bins);
-
- d_subframe += n_items;
-
- /* Are we done ? */
- if (d_subframe == d_subframe_num) {
- /* Send the frame to the display surface */
- d_gui->sendFrame(d_frame, d_subframe_num * d_fft_bins);
-
- /* Start over */
- d_subframe = 0;
- }
-
- return n_items;
-}
-
-int rfnoc_f15_display_impl::_work_wf(const uint8_t* input, int n_items, int port)
-{
- /* Anything to do ? */
- if (n_items < 1)
- return 0;
-
- /* Send them to the display surface */
- d_gui->sendWaterfall(input, n_items);
-
- return n_items;
-}
-
-
-void rfnoc_f15_display_impl::exec_() { d_qApplication->exec(); }
-
-QWidget* rfnoc_f15_display_impl::qwidget() { return dynamic_cast<QWidget*>(d_gui); }
-
-} // namespace qtgui
-} // namespace gr
diff --git a/gr-qtgui/lib/rfnoc_f15_display_impl.h b/gr-qtgui/lib/rfnoc_f15_display_impl.h
deleted file mode 100644
index 6e448c17f..000000000
--- a/gr-qtgui/lib/rfnoc_f15_display_impl.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2015 Ettus Research
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
-
-#ifndef INCLUDED_QTGUI_rfnoc_f15_DISPLAY_IMPL_H
-#define INCLUDED_QTGUI_rfnoc_f15_DISPLAY_IMPL_H
-
-#include <gnuradio/qtgui/rfnoc_f15_display.h>
-#include <cstdint>
-
-namespace gr {
-namespace qtgui {
-
-class QRfnocF15Surface;
-
-/*!
- * \brief QT GUI Display block for RFNoC fosphor (implementation)
- * \ingroup ettus
- */
-class QTGUI_API rfnoc_f15_display_impl : public rfnoc_f15_display
-{
-public:
- rfnoc_f15_display_impl(const int fft_bins = 256,
- const int pwr_bins = 64,
- const int wf_lines = 512,
- QWidget* parent = NULL);
- ~rfnoc_f15_display_impl() override;
-
- /* Block API */
- void set_frequency_range(const double center_freq, const double samp_rate) override;
- void set_waterfall(bool enabled) override;
- void set_grid(bool enabled) override;
- void set_palette(const std::string& name) override;
- void set_frame_rate(int fps) override;
-
- /* gr::block implementation */
- bool start() override;
-
- void forecast(int noutput_items, gr_vector_int& ninput_items_required) override;
-
- int general_work(int noutput_items,
- gr_vector_int& ninput_items,
- gr_vector_const_void_star& input_items,
- gr_vector_void_star& output_items) override;
-
- /* QT GUI Widget stuff */
- void exec_() override;
- QWidget* qwidget() override;
-
-private:
- int _work_hist(const uint8_t* input, int n_items, int port);
- int _work_wf(const uint8_t* input, int n_items, int port);
-
- QRfnocF15Surface* d_gui;
-
- int d_fft_bins;
- int d_pwr_bins;
-
- double d_center_freq = 0.0;
- double d_samp_rate = 0.0;
- int d_frame_rate = 0;
-
- bool d_aligned = false;
- int d_subframe = 0;
- //! Store the number of subframes per histogram frame
- const int d_subframe_num = 0;
- uint8_t* d_frame;
- // Required now for Qt; argc must be greater than 0 and argv
- // must have at least one valid character. Must be valid through
- // life of the qApplication:
- // http://harmattan-dev.nokia.com/docs/library/html/qt4/qapplication.html
- char d_zero = 0;
- int d_argc = 1;
- char* d_argv = &d_zero;
-};
-
-} // namespace qtgui
-} // namespace gr
-
-#endif /* INCLUDED_QTGUI_rfnoc_f15_DISPLAY_IMPL_H */
diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt
index 10e1755bc..ec5316817 100644
--- a/gr-qtgui/python/qtgui/CMakeLists.txt
+++ b/gr-qtgui/python/qtgui/CMakeLists.txt
@@ -54,9 +54,6 @@ if(ENABLE_TESTING)
file(GLOB py_qa_test_files "qa_*.py")
foreach(py_qa_test_file ${py_qa_test_files})
get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
- if(NOT ENABLE_GR_QTGUI_OPENGL AND py_qa_test_name STREQUAL "qa_qtgui_opengl")
- continue()
- endif()
if(CMAKE_CROSSCOMPILING)
get_filename_component(py_qa_test_file ${py_qa_test_file} NAME)
endif(CMAKE_CROSSCOMPILING)
diff --git a/gr-qtgui/python/qtgui/bindings/CMakeLists.txt b/gr-qtgui/python/qtgui/bindings/CMakeLists.txt
index 77e725c03..3ec70bac7 100644
--- a/gr-qtgui/python/qtgui/bindings/CMakeLists.txt
+++ b/gr-qtgui/python/qtgui/bindings/CMakeLists.txt
@@ -55,17 +55,8 @@ list(
# waterfallGlobalData_python.cc
waterfall_sink_c_python.cc
waterfall_sink_f_python.cc
- waterfalldisplayform_python.cc)
-
-if(ENABLE_GR_QTGUI_OPENGL)
- list(
- APPEND
- qtgui_python_files
- rfnoc_f15_display_python.cc
- )
-endif(ENABLE_GR_QTGUI_OPENGL)
-
-list(APPEND qtgui_python_files python_bindings.cc)
+ waterfalldisplayform_python.cc
+ python_bindings.cc)
set(include_dirs ${Qt5Widgets_INCLUDE_DIRS})
if(QWT_FOUND)
@@ -75,10 +66,6 @@ list(JOIN include_dirs "," extra_includes)
gr_pybind_make_check_hash(qtgui ../../.. gr::qtgui "${qtgui_python_files}")
-if(ENABLE_GR_QTGUI_OPENGL)
- target_compile_definitions(qtgui_python PRIVATE OPENGL_FOUND)
-endif(ENABLE_GR_QTGUI_OPENGL)
-
install(
TARGETS qtgui_python
DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
diff --git a/gr-qtgui/python/qtgui/bindings/docstrings/rfnoc_f15_display_pydoc_template.h b/gr-qtgui/python/qtgui/bindings/docstrings/rfnoc_f15_display_pydoc_template.h
deleted file mode 100644
index 1ff82c25e..000000000
--- a/gr-qtgui/python/qtgui/bindings/docstrings/rfnoc_f15_display_pydoc_template.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2022 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-#include "pydoc_macros.h"
-#define D(...) DOC(gr, qtgui, __VA_ARGS__)
-/*
- This file contains placeholders for docstrings for the Python bindings.
- Do not edit! These were automatically extracted during the binding process
- and will be overwritten during the build process
- */
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_rfnoc_f15_display_0 = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_rfnoc_f15_display_1 = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_make = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_set_frequency_range = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_set_waterfall = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_set_grid = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_set_palette = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_set_frame_rate = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_exec_ = R"doc()doc";
-
-
-static const char* __doc_gr_qtgui_rfnoc_f15_display_qwidget = R"doc()doc";
diff --git a/gr-qtgui/python/qtgui/bindings/python_bindings.cc b/gr-qtgui/python/qtgui/bindings/python_bindings.cc
index d2010598d..3650a2be8 100644
--- a/gr-qtgui/python/qtgui/bindings/python_bindings.cc
+++ b/gr-qtgui/python/qtgui/bindings/python_bindings.cc
@@ -37,9 +37,6 @@ void bind_freq_sink_c(py::module&);
void bind_freq_sink_f(py::module&);
void bind_freqcontrolpanel(py::module&);
void bind_freqdisplayform(py::module&);
-#ifdef OPENGL_FOUND
-void bind_rfnoc_f15_display(py::module&);
-#endif
void bind_histogram_sink_f(py::module&);
void bind_histogramdisplayform(py::module&);
void bind_number_sink(py::module&);
@@ -110,9 +107,6 @@ PYBIND11_MODULE(qtgui_python, m)
bind_freq_sink_f(m);
// bind_freqcontrolpanel(m);
// bind_freqdisplayform(m);
-#ifdef OPENGL_FOUND
- bind_rfnoc_f15_display(m);
-#endif
bind_histogram_sink_f(m);
// bind_histogramdisplayform(m);
bind_number_sink(m);
diff --git a/gr-qtgui/python/qtgui/bindings/rfnoc_f15_display_python.cc b/gr-qtgui/python/qtgui/bindings/rfnoc_f15_display_python.cc
deleted file mode 100644
index 073b1ffbb..000000000
--- a/gr-qtgui/python/qtgui/bindings/rfnoc_f15_display_python.cc
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2022 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-/***********************************************************************************/
-/* This file is automatically generated using bindtool and can be manually edited */
-/* The following lines can be configured to regenerate this file during cmake */
-/* If manual edits are made, the following tags should be modified accordingly. */
-/* BINDTOOL_GEN_AUTOMATIC(0) */
-/* BINDTOOL_USE_PYGCCXML(0) */
-/* BINDTOOL_HEADER_FILE(rfnoc_f15_display.h) */
-/* BINDTOOL_HEADER_FILE_HASH(9ba8d496dc1abb2f76017bf7ee0f40ce) */
-/***********************************************************************************/
-
-#include <pybind11/complex.h>
-#include <pybind11/pybind11.h>
-#include <pybind11/stl.h>
-
-namespace py = pybind11;
-
-#include <gnuradio/qtgui/utils.h>
-#include <qwt_legend.h>
-#include <qwt_painter.h>
-#include <qwt_plot.h>
-#include <qwt_plot_canvas.h>
-#include <qwt_plot_curve.h>
-#include <qwt_plot_magnifier.h>
-#include <qwt_plot_marker.h>
-#include <qwt_plot_panner.h>
-#include <qwt_plot_zoomer.h>
-#include <qwt_scale_engine.h>
-#include <qwt_scale_widget.h>
-#include <qwt_symbol.h>
-
-#include <gnuradio/qtgui/rfnoc_f15_display.h>
-// pydoc.h is automatically generated in the build directory
-#include <rfnoc_f15_display_pydoc.h>
-
-void bind_rfnoc_f15_display(py::module& m)
-{
-
- using rfnoc_f15_display = ::gr::qtgui::rfnoc_f15_display;
-
-
- py::class_<rfnoc_f15_display,
- gr::block,
- gr::basic_block,
- std::shared_ptr<rfnoc_f15_display>>(
- m, "rfnoc_f15_display", D(rfnoc_f15_display))
-
- .def(py::init(&rfnoc_f15_display::make),
- py::arg("fft_bins") = 256,
- py::arg("pwr_bins") = 64,
- py::arg("wf_lines") = 512,
- py::arg("parent") = nullptr,
- D(rfnoc_f15_display, make))
-
-
- .def("set_frequency_range",
- &rfnoc_f15_display::set_frequency_range,
- py::arg("center_freq"),
- py::arg("samp_rate"),
- D(rfnoc_f15_display, set_frequency_range))
-
-
- .def("set_waterfall",
- &rfnoc_f15_display::set_waterfall,
- py::arg("enabled"),
- D(rfnoc_f15_display, set_waterfall))
-
-
- .def("set_grid",
- &rfnoc_f15_display::set_grid,
- py::arg("enabled"),
- D(rfnoc_f15_display, set_grid))
-
-
- .def("set_palette",
- &rfnoc_f15_display::set_palette,
- py::arg("name"),
- D(rfnoc_f15_display, set_palette))
-
-
- .def("set_frame_rate",
- &rfnoc_f15_display::set_frame_rate,
- py::arg("fps"),
- D(rfnoc_f15_display, set_frame_rate))
-
-
- .def("exec_", &rfnoc_f15_display::exec_, D(rfnoc_f15_display, exec_))
-
-
- .def(
- "qwidget",
- [](rfnoc_f15_display& self) {
- return reinterpret_cast<uintptr_t>(self.qwidget());
- },
- D(rfnoc_f15_display, qwidget))
-
- ;
-}
diff --git a/gr-uhd/examples/grc/rfnoc_fosphor.grc b/gr-uhd/examples/grc/rfnoc_fosphor.grc
deleted file mode 100644
index 4eb055206..000000000
--- a/gr-uhd/examples/grc/rfnoc_fosphor.grc
+++ /dev/null
@@ -1,406 +0,0 @@
-options:
- parameters:
- author: Grant Meyerhoff <grant.meyerhoff@ni.com>
- catch_exceptions: 'True'
- category: '[GRC Hier Blocks]'
- cmake_opt: ''
- comment: ''
- copyright: ''
- description: ''
- gen_cmake: 'On'
- gen_linking: dynamic
- generate_options: qt_gui
- hier_block_src_path: '.:'
- id: rfnoc_fosphor
- max_nouts: '0'
- output_language: python
- placement: (0,0)
- qt_qss_theme: ''
- realtime_scheduling: ''
- run: 'True'
- run_command: '{python} -u {filename}'
- run_options: prompt
- sizing_mode: fixed
- thread_safe_setters: ''
- title: 'RFNoC: Fosphor Example'
- window_size: (1000,1000)
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [8, 8]
- rotation: 0
- state: enabled
-
-blocks:
-- name: device_type
- id: variable
- parameters:
- comment: ''
- value: '"type=n3xx"'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [616, 88.0]
- rotation: 0
- state: disabled
-- name: device_type
- id: variable
- parameters:
- comment: ''
- value: '"type=e3xx"'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [616, 160.0]
- rotation: 0
- state: disabled
-- name: device_type
- id: variable
- parameters:
- comment: ''
- value: '"type=x4xx"'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [512, 160.0]
- rotation: 0
- state: disabled
-- name: fft_size
- id: variable
- parameters:
- comment: ''
- value: '1024'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [328, 12.0]
- rotation: 0
- state: enabled
-- name: fosphor_decim
- id: variable
- parameters:
- comment: ''
- value: int(samp_rate / (fft_size * pwr_bins * frame_rate))
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [368, 76.0]
- rotation: 0
- state: enabled
-- name: frame_rate
- id: variable
- parameters:
- comment: ''
- value: '30'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [424, 12.0]
- rotation: 0
- state: enabled
-- name: freq
- id: variable_qtgui_range
- parameters:
- comment: ''
- gui_hint: ''
- label: Frequency (Hz)
- min_len: '200'
- orient: QtCore.Qt.Horizontal
- rangeType: float
- start: 1e6
- step: 1e6
- stop: 7.2e9
- value: 1e9
- widget: counter_slider
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [736, 12.0]
- rotation: 0
- state: true
-- name: gain
- id: variable_qtgui_range
- parameters:
- comment: ''
- gui_hint: ''
- label: Gain (dB)
- min_len: '200'
- orient: QtCore.Qt.Horizontal
- rangeType: float
- start: '0'
- step: '1'
- stop: '80'
- value: '10'
- widget: counter_slider
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [872, 12.0]
- rotation: 0
- state: true
-- name: pwr_bins
- id: variable
- parameters:
- comment: ''
- value: '64'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [272, 76.0]
- rotation: 0
- state: enabled
-- name: samp_rate
- id: variable
- parameters:
- comment: ''
- value: int(200e6)
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [232, 12.0]
- rotation: 0
- state: enabled
-- name: uhd_rfnoc_graph
- id: uhd_rfnoc_graph
- parameters:
- alias: ''
- clock_source: ''
- comment: ''
- dev_addr: '"addr=192.168.20.2"'
- dev_args: ''
- num_mboards: '1'
- time_source: ''
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [544, 12.0]
- rotation: 0
- state: true
-- name: blocks_message_debug_0
- id: blocks_message_debug
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- en_uvec: 'True'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [32, 424.0]
- rotation: 180
- state: enabled
-- name: blocks_null_sink_0
- id: blocks_null_sink
- parameters:
- affinity: ''
- alias: ''
- bus_structure_sink: '[[0,],]'
- comment: ''
- num_inputs: '2'
- type: byte
- vlen: fft_size
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [160, 672.0]
- rotation: 180
- state: disabled
-- name: qtgui_fosphor_display_0
- id: qtgui_rfnoc_f15_display
- parameters:
- affinity: ''
- alias: ''
- center_freq: '50000'
- comment: ''
- fftsize: fft_size
- frame_rate: '30'
- grid_enabled: 'True'
- gui_hint: ''
- maxoutbuf: '0'
- minoutbuf: '0'
- palette: iron
- pwr_bins: pwr_bins
- samp_rate: samp_rate
- wf_enabled: 'True'
- wf_lines: '512'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [288, 356.0]
- rotation: 180
- state: enabled
-- name: uhd_rfnoc_ddc_0
- id: uhd_rfnoc_ddc
- parameters:
- affinity: ''
- alias: ''
- block_args: ''
- comment: ''
- device_select: '-1'
- freq: '0'
- instance_index: '-1'
- maxoutbuf: '0'
- minoutbuf: '0'
- num_chans: '1'
- output_rate: samp_rate
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [344, 164.0]
- rotation: 0
- state: true
-- name: uhd_rfnoc_fft_0
- id: uhd_rfnoc_fft
- parameters:
- affinity: ''
- alias: ''
- block_args: ''
- comment: ''
- device_select: '-1'
- fft_direction: FORWARD
- fft_length: fft_size
- fft_magnitude: COMPLEX
- fft_scaling: '1706'
- fft_shift_config: NORMAL
- instance_index: '-1'
- maxoutbuf: '0'
- minoutbuf: '0'
- num_chans: '1'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [704, 180.0]
- rotation: 0
- state: true
-- name: uhd_rfnoc_fosphor_0
- id: uhd_rfnoc_fosphor
- parameters:
- affinity: ''
- alias: ''
- alpha: '65280'
- comment: ''
- device_select: '-1'
- enable_dither: 'True'
- enable_noise: 'True'
- enable_wf: 'True'
- epsilon: '1'
- hist_decim: fosphor_decim
- instance_index: '-1'
- maxoutbuf: '0'
- minoutbuf: '0'
- offset: '0'
- scale: '256'
- tdecay: '16384'
- trise: '4096'
- wf_decim: fosphor_decim
- wf_mode: MODE_MAX_HOLD
- wf_prediv: RATIO_1_1
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [800, 380.0]
- rotation: 180
- state: true
-- name: uhd_rfnoc_rx_radio_0
- id: uhd_rfnoc_rx_radio
- parameters:
- affinity: ''
- agc: Default
- alias: ''
- antenna: RX2
- bandwidth: '0'
- block_args: ''
- comment: ''
- dc_offset: 'False'
- device_select: '-1'
- frequency: freq
- gain: gain
- instance_index: '-1'
- iq_balance: 'False'
- maxoutbuf: '0'
- minoutbuf: '0'
- num_chans: '1'
- rate: samp_rate
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [8, 116.0]
- rotation: 0
- state: true
-- name: uhd_rfnoc_rx_streamer_0_0
- id: uhd_rfnoc_rx_streamer
- parameters:
- adapter_id_list: '[0]'
- affinity: ''
- alias: ''
- args: ''
- comment: ''
- maxoutbuf: '0'
- minoutbuf: '0'
- num_chans: '1'
- otw: s8
- output_type: s8
- use_default_adapter_id: 'True'
- vlen: fft_size
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [568, 408.0]
- rotation: 180
- state: true
-- name: uhd_rfnoc_rx_streamer_0_0_0
- id: uhd_rfnoc_rx_streamer
- parameters:
- adapter_id_list: '[0]'
- affinity: ''
- alias: ''
- args: ''
- comment: ''
- maxoutbuf: '0'
- minoutbuf: '0'
- num_chans: '1'
- otw: s8
- output_type: s8
- use_default_adapter_id: 'True'
- vlen: fft_size
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [568, 440.0]
- rotation: 180
- state: true
-
-connections:
-- [qtgui_fosphor_display_0, cfg, blocks_message_debug_0, print]
-- [uhd_rfnoc_ddc_0, '0', uhd_rfnoc_fft_0, '0']
-- [uhd_rfnoc_fft_0, '0', uhd_rfnoc_fosphor_0, '0']
-- [uhd_rfnoc_fosphor_0, '0', uhd_rfnoc_rx_streamer_0_0, '0']
-- [uhd_rfnoc_fosphor_0, '1', uhd_rfnoc_rx_streamer_0_0_0, '0']
-- [uhd_rfnoc_rx_radio_0, '0', uhd_rfnoc_ddc_0, '0']
-- [uhd_rfnoc_rx_streamer_0_0, '0', qtgui_fosphor_display_0, '0']
-- [uhd_rfnoc_rx_streamer_0_0_0, '0', qtgui_fosphor_display_0, '1']
-
-metadata:
- file_format: 1
- grc_version: v3.11.0.0git-372-gb260520f