| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing block combinations of complex-to-ichar/ichar-to-complex
and complex-to-ishort/ishort-to-complex was not exposing a scale
factor to the UI (it was hard-coded at 1.0) which prevented the blocks
from being used with voltage-based inputs and outputs, for example
a -127 to 127 byte input would be mapped directly to the same value
as a float. The same was true in reverse and there were notes in
the code about FIX clipping. Adding the scale factor provides a
mechanism for the user to appropriately fix the clipping and scale
the conversion correctly. Additional documentation was added to
the block yml to provide guidance to users on how to appropriately
select the scale factor for their use case, and the default value
was set to 1.0 for backward compatibility.
|
|
|
|
|
|
|
|
|
|
| |
For testing, it is often useful to check all tags ever received, rather than
solely the tags from the last call to the Tag Debug's work function. This patch
adds this option and a public method for activating it.
This is more appropriate for controlled test environments, where the vector of
tags is known not to grown indefinitely. Hence, the option is not exposed as a
block parameter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added support for C++ std::map<> from python dict
- Fixed default initialization of parameters in main()
- Added missing include for realtime scheduling
- Added default CMake option for std=c++11 as this is required for
gnuradio >= 3.8
- Fixed mako template to add initialization to parameter declarations in
main()
- Fixed C++ constructor initialization list generation
- Fixed parameter type determination when an lvalue is used in an rvalue
expression
- Improved determining type of C++ variables
- Added C++ support for gr_complex parameters
- Fixed C++ generation of nested container types
- Added C++ support for virtual source/sink
- Moved cmake CMAKE_CXX_STANDARD 11 option from options.yml to
CMakeLists.txt.mako
- Fixed qtqui_sink to allow multiple instances
- Revised virtual connection processing in cpp_top_block.py
Reviewed-By: Håkon Vagsether <hauk142@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This block incorporates the OOT modules in correctiq that provide
3 different techniques to remove the DC spike inherent in IQ sampling.
The first technique mirrors SDR GUI receivers with an IIR filter
approach, the second provides a time-limited IIR approach where after
a user-configurable number of seconds locks into a basic offset
correction to eliminate the effect of the filter on the signal while
maintaining the correction, and the last is manual I and Q
configurable offsets. The Swap IQ block is a drop-in block to help
correct for inverted spectrums and just swaps I<->Q.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These 3 new blocks provide the missing glue to move between messages
and variables in the same flowgraph. There are 3 variants here:
1. Monitor a variable and produce a user-specified message (pair)
when the variable changes. Useful bridging standard GUI controls
to message-based blocks.
2. When an inbound message (pair) is received, update a specified
variable.
3. When an inbound message (dict) is received, extract a single
dictionary entry and produce a message pair (useful if you have a
multi-value dictionary but you just want to pull off a single
attribute such as frequency or gain without modifying the upstream
block. This can be paired with (2) if necessary to move from a
dictionary item to a variable.
|
|
|
|
|
|
| |
* no speed advantage of GR_M_TWOPI: every compiler pre-computes
constants, so that (2 * GR_M_PI) is just as fast
* rest of constants not even used
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This update is focused on improving the throughput of the Costas
loop, however some changes are more global performance enhancements
as this PR has evolved. Updates include an ENABLE_NATIVE added to
CMake, which is off by default but enables native compiling (including
FMA support) if desired; sincos was inlined in sincos.h and sincos.cc
was removed from the appropriate CMake to improve sincos speed, some
constants were added to math.h, inlined functions in costas loop and
nco.h, used switch instead of function pointer (much faster), and
used fast complex multiply to get around all the range checking in
the standard complex.h complex multiply function on all builds.
|
|
|
|
|
|
|
|
|
|
|
| |
This feature adds the ability to insert arbitrary code into the python
flowgraph. It gives a little more low-level flexibility for quickly
modifying flowgraphs and adding custom bits of code rather than having
to go and edit the generated py file
One example is synchronizing multiple USRP objects - sometimes you want
different sync than what is offered in the multi-usrp object, so you can
put a bit of code in the snippet block to do the custom synchronization
|
|
|
|
|
|
|
| |
Python has a RuntimeError that's thrown during the pmt to_python function.
Instead of throwing this error, SWIG has been updated to throw a TypeError.
This allows us to keep the same behavior whereby we iterate over PMT types
until the proper conversion is found
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
To ensure that the throttle block operates normally even if the system
clock changes, I've switched it to use std::chrono::steady_clock, which
is a monotonic clock.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This yml adds a convenience-wrapper block to provide volk-accelerated
frequency shifting based on the rotator block that doesn't require
the user to "import math" and code the "2Pifreq/samp_rate" as the
phase increment. I don't think newbies know a rotator with a phase
increment results in a frequency shift (I didn't for the longest time)
and may be relying on less CPU-efficient means such as a signal
source/multiply or a frequency xlating fir filter (the latter
one-sample-at-a-time rotates as it decimates rather than leveraging
volk to do a block).
|
|
|
|
| |
Input and output port selection can now be controlled by messages.
|
| |
|
|
|
|
|
|
|
|
|
| |
The default values in the chooser changed in a previous commit so
it did not translate properly to this flowgraph
There are probably more flowgraphs that will be affected by this
Fixes #3027
|
|
|
|
|
|
| |
Found by coverity. CID:
* 1395913
* 1395940
|
|
|
|
| |
Found by coverity. CID 1043276
|
|
|
|
|
| |
This fixes every leftover file in the GNU Radio source tree to match our
clang-format definition.
|
|
|
|
|
| |
Simple flowgraph to start and stop via a checkbox the saving of a file
to the tagged file sink block
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use volk_32fc_x2_add_32fc to volk add constants to the input vector of
the block
- use volk::vector in add_const_ff_impl: Rather than using float* for
variable length vector addition in volk, use volk::vector<float> for
easier resizing.
- Use scoped_lock when modifying private data members in
add_const_ff_impl.cc. Remove getter functions for the d_k_copy vector.
Cast with static_cast rather than typical cast. Use vector.data()
rather than &vector[0].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constexpr is like const but (for variables) guarantees evaluation at
compile time (as opposed to runtime).
Likely this change will do nothing on its own (though it could, since
it gives the compiler more information). But it still has benefits.
It allows programmer to know that initialization is not expensive (it
was done at compile time), and reduces risk of a refactoring
regressing the compiletimeness.
Runtime initialization can be nonobvious in larger codebases. E.g.:
struct S {
static int foo();
};
const int bar = S::foo(); // Called and initialized at *runtime*.
int S::foo() { return 10; }
With constexpr:
struct S {
static constexpr int foo();
};
constexpr int bar = S::foo(); // Error: used before definition.
constexpr int S::foo() { return 10; }
Initializing at runtime is not just startup costs, but also can save
memory since it'll end up in a R/O section of a binary and therefore
doesn't need to be swapped out, but can be shared (in the mmap() sense
of the word).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several components use the following translation in cpp_templates:
```
translations: gr.sizeof_: 'sizeof('
```
The problem is the generated code is missing a closing parens i.e.:
this->blocks_delay_0 = blocks::delay::make(sizeof(gr_complex*1, 0);
This could be fixed by adding a closing parens in the make template, but
it looks awkward to have an unmatched closing parens. And only a few
blocks currently have this closing parens added. Most of them produce
erroneous code like that above.
However, this sizeof translation is not even needed in the YAML file
because cpp_top_block.py explicitly adds the proper sizeof translation.
```
translations.update( {r"gr\.sizeof_([\w_]+)": r"sizeof(\1)"} )
```
So removing this translation all together produces correct code for
blocks that use gr.sizeof_X.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The default is complex_double, or float. The former is rarely used in
GNU Radio, hence, it is not a good default.
|
| |
|
|
|
|
|
|
|
|
| |
Using memset with gr_complex is not a problem since the underlying
representation of gr_complex is guaranteed to be two floats in
adjacent memory locations without padding or additional memory.
Fixes #2743
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is C++11: you can convert
std::vector<complextype> vec;
vec.push_back(complextype(foo, bar, baz));
by
std::vector<complextype> vec;
vec.emplace_back(foo, bar, baz);
which saves one unnecessary copy.
This mostly happened in rpc code.
The automated clang-tidy check failed miserably, so most of this was
done by hand.
|