summaryrefslogtreecommitdiff
path: root/grc
Commit message (Collapse)AuthorAgeFilesLines
...
* gr-blocks: Standardize Vector parameter nameSolomon Tan2021-05-193-4/+4
| | | | | | | | Addresses point 1 of Issue #4615. Replaces all label instances of "Vec Length" to "Vector Length". Also replaces "Vec Rate" to "Vector Rate" for standardization. Signed-off-by: Solomon Tan <solomonbstoner@yahoo.com.au>
* grc: Make exception for epy in blacklist idSolomon Tan2021-05-152-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I refer to the mailing list thread on May 8 2021 regarding "Embedded Python Block Tutorial Param ID Error". The bug is caused by #4522 as names of embedded python blocks such as `epy_block_0` are blacklisted because of "blocks" in the argument `black_listed_ids`. It affects both embedded python blocks and modules. This commit fixes the bug by granting exemption for these two types of blocks from id validation. This commit makes the regex more strictly follow the naming convention of epy blocks and modules so that only these will be fast-tracked through the id validation. The naming convention appears to be a "epy" prefix, followed by "block" or "module", and a number suffix. This regex also takes into account the user copying-and-pasting the epy blocks resulting in id names like `epy_block_0_0` and `epy_block_0_0_0`. Instead of checking for epy blocks or modules using the naming convention in the id like commit ac383d1 does, this commit checks by looking at the block's key. All epy blocks and modules are identified with the key `epy_block` and `epy_module` respectively. This commit fixes the bug by changing the import name such that it does not coincide with the generated id for epy blocks and modules. This means that there no longer needs to be an exception case in the validation id function for epy blocks and modules. This commit fixes the bug by giving epy blocks and modules a new attribute that grants them exemption from blacklist id validation. Unlike v1, v2 and v3, this does not depend on the naming convention of the block ids or block keys, which could change in the future, making the code less of a hassle to maintain. Improved on v5 (commit b85da80) with the following changes. 1. Changed `exempt_from_id_validation` from an instance variable to a class variable since all instances of epy blocks and modules are affected by the bug mentioned in v5. 2. Changed `hasattr` to `getattr` to prevent the bug where a block is exempted from id validation when `exempt_from_id_validation=False`. Improved from v6 (commit e66ed85). This grants the exemption to blocks/modules only after they are marked for blacklist. This change makes sure that the id exemption is used only to prevent the blacklisting bug. The blocks/modules will still go through other forms of id validation such as the naming convention check. Signed-off-by: Solomon Tan <solomonbstoner@yahoo.com.au>
* grc: Fix option_attributes check on inherited typeIgor Freire2021-04-191-3/+3
| | | | | | | | | | Run the option_attributes validation routine on the extended dictionary, i.e., after inheriting the properties from the base_key parameter. By doing so, if the dtype property is inherited, the _validate_option_attributes still sees it and does not throw a key error. Signed-off-by: Igor Freire <igor@blockstream.com>
* grc: update id blackist with importsVolker Schroer2021-04-153-10/+22
| | | | Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
* grc: match data type aliases as well as typesJeff Long2021-04-102-1/+18
| | | | Signed-off-by: Jeff Long <willcode4@gmail.com>
* grc: Check connection types, whether they matchVolker Schroer2021-04-091-0/+5
| | | | Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
* grc : fix block can move outside top and left boundaryChristophe SEGUINOT2021-04-061-1/+16
| | | | | | * gui : fix block can move outside top and left boundary Signed-off-by: Christophe Seguinot <christophe.seguinot@univ-lille.fr> Co-authored-by: Sebastian Koslowski <sebastian.koslowski@gmail.com>
* GRC Fix Date String in About dialogMarcus Müller2021-03-241-2/+1
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* grc: optionally show variable names in graph #4109 (#4279)Jason Uher2021-03-164-19/+70
| | | | | | | | 1. Add option to show variable name only 2. Add option to show variable name and value 3. default to traditional behavior Signed-off-by: Jason Uher <jason.uher@jhuapl.edu>
* grc: fix widget whitout GUI_hint may superpose to otherChristophe Seguinot2021-03-101-1/+4
| | | | Signed-off-by: Christophe Seguinot <christophe.seguinot@univ-lille.fr>
* grc: validate gui hintsChristophe Seguinot2021-03-101-3/+3
| | | | Signed-off-by: Christophe Seguinot <christophe.seguinot@univ-lille.fr>
* grc: validate gui hintsChristophe Seguinot2021-03-101-6/+2
| | | | Signed-off-by: Christophe Seguinot <christophe.seguinot@univ-lille.fr>
* grc: order blocks with GUI Hint firstChristophe Seguinot2021-03-101-0/+12
| | | | Signed-off-by: Christophe Seguinot <christophe.seguinot@univ-lille.fr>
* Revert " grc: restore pre-3.8 block id behavior"Josh Morman2021-03-102-3/+3
| | | | | | This reverts commit 1fbf9ba89c643f478024d6af797e0a0dbbdf5ba3. Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* grc: add top_block.py to .gitignoreJosh Morman2021-03-041-0/+1
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* grc: remove gnuradio prefix from linked librarieskarel2021-03-031-1/+1
| | | | | | this allows OOT modules to be linked, as those will not link with the prefix Signed-off-by: karel <5636152+karel@users.noreply.github.com>
* grc: Call connect() for hier blocks that don't have portsHåkon Vågsether2021-02-112-0/+7
| | | | Signed-off-by: Håkon Vågsether <hakon.vagsether@gmail.com>
* Fix typosluz paz2021-02-082-2/+2
| | | | | | | | Found via `codespell v2.1.dev0` `codespell -q 3 -L ans,fo,hist,inout,ist,ith,nd,sinc,uint -S ./volk` Signed-off-by: luz paz <luzpaz@users.noreply.github.com> Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* cppgen: Use correct required version in CMakeListsHåkon Vågsether2021-02-011-1/+1
| | | | Signed-off-by: Håkon Vågsether <hauk142@gmail.com>
* grc: prefix generated modules with flowgraph idSebastian Koslowski2021-02-012-5/+14
| | | | ...so they play nice with epy modules generated from other fg in the same dir
* grc: clean-up flags in epy moduleSebastian Koslowski2021-02-011-3/+3
|
* grc: save epy blocks/modules to hier_block_dirSebastian Koslowski2021-02-012-21/+19
|
* grc: ensure that strings are valid utf8 when evaluating parametersDaniel Estévez2021-01-292-0/+9
| | | | | | | | | | | | | | | | | | | | | Some objects, notably PMTs can produce non-UTF-8 strings when their __str__() method is called. For instance >>> str(pmt.init_u8vector(1, [203])) '#[\udccb]' These kinds of strings eventually give a UnicodeEncodeError, for instance when calling print() or displaying them with GTK. Python3 strings are supposed to be valid UTF-8. When these objects are used inside block parameters in GRC, it will produce several tracebacks and hang up. This commit fixes the problem by sanitizing the strings to convert them to valid UTF-8. The sanitization uses the 'backslashreplace' error response from Python. Issue #3398 is caused by this problem. Signed-off-by: Martin Braun <martin@gnuradio.org>
* Fix drag n' drop issue with Quartz (macOS) backendEmmanuel Blot2021-01-141-1/+2
|
* grc: Don't draw disabled and hidden blocks, even if they are selectedHåkon Vågsether2021-01-131-1/+3
| | | | Signed-off-by: Håkon Vågsether <hauk142@gmail.com>
* GRC: Actions with preferences now explicitly default to somethingMarcus Müller2021-01-131-2/+9
|
* GRC: Actions.py needed code formatting to be workableMarcus Müller2021-01-131-102/+197
|
* grc: In flowgraph, use closeEvent() to stop flow graph and not aboutToQuitSylvain Munaut2021-01-121-5/+6
| | | | | | | | | | | | | | | | | | | | | So originally I introduced the aboutToQuit() stuff in the hope to cleanly shutdown the flow graph, including the Qt widgets blocks before the Qt stuff is torn down. Turns out that in aboutToQuit some stuff is already invalid, especially in OpenGL and so causes SegFault on exit. Instead this patch modify the logic so that we stop the flow graph before Qt even begin disabling things. The two shutdown path that exits are : - The sig_handler in case we get TERM or INT signals - The closeEvent() of the main window This makes sure that both path call tb.stop() tb.wait() and also any snippet 'main_after_stop'. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* grc: Move snippets prep earlier in the fileSylvain Munaut2021-01-121-24/+28
| | | | | | | They are going to be needed in the closeEvent() Qt stuff and this is earlier in the file ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* grc: Save config before execution and update recent file sub-menu.David Pi2021-01-123-15/+25
| | | | | | | | Saves the grc prefs before executing a flowgraph to avoid losing them if anything goes wrong and grc needs to be forcibly closed. Also fixes recent files sub-menu refresh. When a file is opened, opened from recent, or saved as, the recent files sub-menu is now updated.
* grc: Make it possible to copy error messageOleksandr Kravchuk2021-01-111-1/+17
|
* grc: Remove extra logger in grc/core/platformSeth Hitefield2021-01-112-2/+9
| | | | | | | | | | This is an update for PR #2424. The extra debug output from GRC was being generated by another logger instance in grc/core/platform that did not respect the command line arguments. This removes the extra logger and sets the logger level in main to whatever is requested from the command line. See grc/main.py:43 for more detail.
* grc: Let test_generator.py know where to find blocksHåkon Vågsether2021-01-111-2/+5
| | | | Signed-off-by: Håkon Vågsether <hauk142@gmail.com>
* grc: Clean up test_expr_utils.pyHåkon Vågsether2021-01-111-9/+6
| | | | Signed-off-by: Håkon Vågsether <hauk142@gmail.com>
* grc: Accept file pointer in load_stdlib() (converter/xml.py)Håkon Vågsether2021-01-112-3/+6
| | | | | | Fixes test_xml_parser.py failing in the absence of lxml Signed-off-by: Håkon Vågsether <hauk142@gmail.com>
* replace fft.window.WIN_ with window.win_ and include in grc default importJosh Morman2020-12-181-0/+1
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* more qt4 qt5 updatesA. Maitland Bottoms2020-12-181-1/+1
| | | | Have additional apps, examples, and tools use Qt5 instead of Qt4.
* grc: indent multiline connections in py flowgraphMike Walters2020-12-181-1/+1
| | | | | | | | This fixes flowgraph generation when using connection templates with multiple lines. Previously it would only indent the first line and subsequent lines would have no indentation, causing a python error. Signed-off-by: Mike Walters <mike@flomp.net>
* grc: restore pre-3.8 block id behaviorJacob Gilbert2020-12-172-3/+3
| | | | Prior to 3.8 block IDs were shown in the properties dialogue for every block as these are important for function of some GR features. #2795 brought this back as an option for 3.8+, however it forces the 'hide' value to effectively be 'none' instead of 'part' (not visible on the block canvas but visible in the properties dialogue) for all blocks. This changes this back to the pre-3.8 behavior where the ID value is not shown on the canvas but is shown in the properties dialogue.
* grc: Fix message port show/hide problem due to bus logic updateDavid Pi2020-12-171-2/+5
| | | | | | | | update_bus_logic() is called when disabling a bus, it doesn't check if it's been previously enabled. This causes it to restore port.hidden with a None which ultimately is converted to False. So it never hides the message ports. Also, filter message ports from buses.
* Update parameter background colours realtimeVolker Schroer2020-12-171-4/+4
|
* Bump the C++ standard version to C++14Marcus Müller2020-12-171-1/+1
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* grc: remove gnome-terminal deprecation warningmormj2020-12-171-1/+4
| | | | | | | | | | | When running a "No GUI" flowgraph from GRC, it gives the following deprecation warning: Option “-e” is deprecated and might be removed in a later version of gnome-terminal. Use “-- ” to terminate the options and put the command line to execute after it. This follows the suggested fix to update the deprecation Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* grc: Fix multiple 'Apply' in modify block parameters dialog boxDavid Pi2020-12-171-4/+1
| | | | | | | | | When the modify parameters dialog block is constructed, the instance of the block to be modified, is passed in. When the apply button is clicked there is an extraenous flowgraph.import_data() call that re-creates all blocks in the flowgraph. The consequence is that the block instance passed to the dialog box is no longer the one in the flowgraph, and so subsequent Applies have no effect. This change simply removes this call.
* Add test to postinstall only , if testing is enabledVolker Schroer2020-11-301-5/+6
|
* grc: add wiki link to properties dialog docs (#3933)Jeff Long2020-11-221-2/+9
| | | So user's don't have to copy/paste the URL
* cppgen: Update to modern CMakeHåkon Vågsether2020-11-075-27/+22
|
* Fix typos throughout the codeluzpaz2020-10-293-6/+6
| | | | | | | * Fix various typos Found via `codespell v2.0.dev` `codespell -q 3 -L ans,fo,hist,inout,ist,ith,nd,sinc,uint -S ./volk`
* GRC / Metainfo: add unit testMarcus Müller2020-10-281-0/+6
| | | | Depends on appstreamcli; so only enabled when that is found.
* GRC: add metainfo fileMarcus Müller2020-10-282-0/+63
|