New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grc: add python snippets to GRC #3169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an adequate, good implementation!
It balances two interests:
- ease of use – the
snippet
block is as easy as users would want it to have, and it's non-singular - sanity of use – the snippets are aggregated in dicts, have order and are inserted into the generated Python on demand.
I think we should let this balloon launch and see how it flies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I'm going to test out this branch shortly, will merge if no issues found.
@mormj Can you please add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested / verified functionality, but this PR reads well & I love the concept of inserting snippets ... how many times have I just edited the resulting Python to do the snippets by hand? I'm with Marcus: let's get this merged & see how it flies!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the cmake fix mentioned in the comment above, this should be good to go.
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
43d7e01
to
892b6d3
Compare
@devnulling thanks for staying on top of the examples - too easy to forget. Should be good to go now. |
@devnulling please go ahead and merge if this meets your change request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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
This supercedes #2779 and #2814 - hopefully the issues identified on those PRs have been sufficiently resolved, as the details of last iteration were worked out with @dkozel and @marcusmueller at the ESA hackfest.