| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
The phase-relations plot didn't specify a handle for the Qt parent,
which used to be OK (it would default to None) but no longer is.
Signed-off-by: Martin Braun <martin@gnuradio.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
uhd_fft and uhd_siggen_gui are standalone apps that, a long time ago,
were spun off from GRC apps. In the last years, there were some fixes to
Qt apps that haven't yet made it into these two UHD apps:
- 0cc238fb: Better terminate handling
- 40f5e6cd: XInitThreads() as early as possible. This was accidentally
moved downwards as part of refactoring in 77871a9b.
Signed-off-by: Martin Braun <martin.braun@ettus.com>
|
|
|
|
| |
Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables absolute power support for uhd_fft. For example:
uhd_fft --power -20 --args [...]
will run uhd_fft with all the usual settings, but will set the gain such
that the reference power level is -20 dBm. The y-axis will be labeled
differently ("RX Power Level (dBm)") and the gain slider will be
replaced by a power reference level slider.
Reading the actual received power from the display requires some DSP
knowledge. First, the choice of window will move energy into sidelobes,
and of course, scalloping loss plays a role. By choosing a boxcar window,
and moving the signal close to the center of a bin, it is possible to
measure the power of a single tone, assuming the USRP has been
previously calibrated.
A more accurate y-label would be "dBm per FFT bin after FFT processing"
but that is considered a bit unwieldy.
The y-axis scaling is achieved by throwing in a multiplier that moves
a full-scale signal to the corresponding power value, and using the
recently introduced features to normalize windows. That means scaling
the reference power will be visible in the scope plot, but not in the
FFT plot unless the signal starts to clip.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: This requires a USRP with power API enabled.
Summary of changes:
- uhd_app now provides the --power argument and applies it as
a reference power level. It clashes with --gain. UHDApp now has two
'modes' for setting the power: Via gain (the previous, standard way)
or by setting a power. UHDApp calls all the right APIs for each use
case.
- uhd_siggen_base is now aware of these settings and will make sure the
output power is correct by combining the requested power and the
requested amplitude (meaning, it sets a ref power that is at the
correct level above the requested power level).
- The GUI can now set either power or gain, depending on command line
arguments. When changing the amplitude in power mode, the ref power is
also changed so the output power (in dBm) stays the same when the
amplitude changes.
- siggen now checks for invalid amplitudes (must be in 0 <= amplitude <=
1).
- --amplitude was moved from uhd_app.py to uhd_siggen_base.py, where it
belongs. uhd_fft for example does not have that argument.
- If --amplitude is set to 0.0, then it now fails in power mode. It's
still possible in gain mode.
|
|
|
|
|
|
|
|
|
|
|
| |
This in preparation for future modifications of uhd_fft (and easier
review thereof). This is mostly:
- Whitespace cleanup
- Removal of dead code
- Breaking of long lines
PyLint is much happier and can provide more useful warnings. No
functional changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All of the removed `from __future__ import` were needed in older
versions of Python (mostly 2.5.x and below) but later became mandatory
in most versions of Python 3 hence are not necessary anymore.
More specifically, according to __future__.py[1]:
- unicode_literals is part of Python since versions 2.6.0 and 3.0.0;
- print_function is part of Python since versions 2.6.0 and 3.0.0;
- absolute_import is part of Python since versions 2.5.0 and 3.0.0;
- division is part of Python since versions 2.2.0 and 3.0.0;
Get rid of those unnecessary imports to slightly clean up the codebase.
[1] https://github.com/python/cpython/blob/master/Lib/__future__.py
|
|
|
|
|
|
|
|
|
| |
Instead of relying on the pyuhd pybind11 bindings, create new gr::uhd
pybind11 bindings that wrap the underlying types. Trying to use the
pyuhd bindings directly has many issues
Also, push some of the overloading into the constructors as opposed to
in the __init__ functions with constructor interception
|
|
|
|
|
|
| |
This moves the `import sip` statements in uhd_fft and uhd_siggen_gui
below the import for Qt, without which import errors can occur on
platforms such as Fedora 31.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Update SWIG settings
- Update CMake
- Remove Python2 references
Note: This does not touch a lot of Python files, and many Python files
will still work with Python 2 after this commit. However, we won't allow
that in our CMake, and the support will be gone too.
|
| |
|
|
|
|
|
|
| |
There are cases when the Qt-based apps in gr-uhd would crash because Qt
would try and load previous geometry settings which didn't exist. This
disables applying previous geometry if the setting is empty.
|
|
|
| |
--update-rate is really a period, not a rate, from what I can tell. Instead of changing the variable name, I just edited the argparse note to mention that the units are in seconds.
|
|
|
|
| |
Qt4 no longer supported.
|
|
|
|
|
| |
- Import order for uhd_fft
- Convert iterators to lists
|
|
|
|
|
| |
1f857d3 changed variable "which" to be unsigned, so the default can't
be -1.
|
| |
|
| |
|
|\ |
|
| | |
|
|/
|
|
| |
filter out signal of interest
|
| |
|
| |
|
|
|
|
|
| |
- --help didn't work
- Some tuning corner cases weren't properly handled
|
|
|
|
|
| |
- UHDApp would not accept new frequencies after startup
- uhd_fft now has multi-channel capabiltities
|
| |
|
| |
|
|
|
|
| |
We should be more careful about letting these into the code in the future. In emacs, we can use (add-hook 'before-save-hook 'delete-trailing-whitespace).
|
|
|
|
|
| |
* Both dict["key"] and dict.get("key") syntax work
* Updated uhd_fft, uhd_rx_cfile, and uhd_siggen_base.py to use new syntax
|
| |
|
|
|
|
| |
lack of daughterboard
|
| |
|
|
|
|
| |
This makes gr-wxgui more like a normal component that generates a libgnuradio-wxgui.so file.
|
| |
|
|
|
|
| |
dboard id's
|
|
|
|
|
|
| |
this in the future.
The sed script was provided by Moritz Fischer.
|
| |
|
| |
|
|
|