summaryrefslogtreecommitdiff
path: root/gr-qtgui/python/qtgui/bindings/freq_sink_c_python.cc
Commit message (Collapse)AuthorAgeFilesLines
* qtgui: Replace pyqwidget() with qwidget()David Winter2021-09-031-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, two versions of the `qtwidget` functions existed, `qwidget()` and `pyqwidget()`, with the only difference being that `qwidget()` returned a pointer to the `QWidget` object managed by the corresponding block, while `pyqwidget()` returned that same pointer, but as an integer (Or `PyLong` in this case). While `qwidget()` is used by C++ code accessing the widgets, `pyqwidget()` is only used for the python interface. This makes these two methods redundant, thus this commit entirely removes `pyqwidget()`, and modifies the `qwidget()` python wrapper to behave like `pyqwidget()`. Note that we can be fairly confident that this change will not effect potential users of `qwidget()`, because any invocation on the objects previously returned by `qwidget()` would cause a segmentation fault. This commit also fixes a memory leak: Internally, the `pyqwidget()` functions were returning a PyLong `PyObject *`, which was then upwrapped in a pybind trampoline without decrementing the reference count of that python object. Signed-off-by: David Winter <david.winter@analog.com>
* qtgui: python: bindings: Use nullptr instead of nonstandard __null.Ryan Volz2020-10-051-1/+1
| | | | This fixes compilation with MSVC.
* qtgui: freq_sink: Allow normalization of window functionsMartin Braun2020-08-171-0/+5
| | | | | | | | | | | | | | | | | | | | When switching between window functions in a live FFT GUI session, the difference in power of the window functions is notable. This allows asserting the 'normalize' argument of fft::window::build() by setting a bit in the window type during construction,, or by calling a new API call: set_fft_window_normalized(). Note: The choice to use an unused bit to set the normalization comes from an attempt to keep the API backward compatible. Adding a new argument to the make call would require reordering the make arguments. This feature allows changing window types without signal power varying due to window power differences. Note that this does not affect scalloping loss, or processing loss from the window. For example, the peak value of a sine tone will still vary for different windows, because different windows distribute the power differently, and most window functions move power to the sidelobes.
* gr-qtgui: Replace PyLong_AsLong with PyLong_AsLongLong for 32-bit systems.Ron Economos2020-06-291-2/+4
|
* qtgui: add pybind11 bindingsJosh Morman2020-06-041-0/+293