summaryrefslogtreecommitdiff
path: root/grc/core/params/param.py
Commit message (Collapse)AuthorAgeFilesLines
* grc: pep8 formattingJosh Morman2021-11-241-23/+40
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* grc: Write "ID", not "Id"Håkon Vågsether2021-10-111-1/+1
| | | | Signed-off-by: Håkon Vågsether <hauk142@gmail.com>
* grc: Raise error for unfilled parametersSolomon Tan2021-09-271-1/+1
| | | | | | | | Issue 5032 results from an unfilled parameter erroneously indicated as filled with a default value of 0. This PR makes grc indicate an error when there is an unfilled parameter by returning None. Signed-off-by: Solomon Tan <solomonbstoner@yahoo.com.au>
* grc: allow short and byte as valid types in an enumJeff Long2021-07-191-1/+1
| | | | Signed-off-by: Jeff Long <willcode4@gmail.com>
* grc: introduce gui_hint for cpp code generationVolker Schroer2021-07-191-12/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment some qtgui windows do support only very simple gui hints, as the parse_gui_hint in param.py generates independently of the output language only python code. This is fixed here, so the gui_hint() can be used in cpp code generation. To test more complex gui hints the qtgui_tab_widget was extended to cpp. After that compiling the generated cpp code for some examples led to /usr/include/python3.9/object.h:206:23: Fehler: expected unqualified-id before »;« token 206 | PyType_Slot *slots; /* terminated by slot==0. */ This is a known error and can be fixed by ifdef ENABLE_PYTHON pragma push_macro("slots") undef slots include "Python.h" pragma pop_macro("slots") endif instead of simply ifdef ENABLE_PYTHON include "Python.h" endif which was applied to the corresponding gr-qtgui header files. Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
* grc: update id blackist with importsVolker Schroer2021-04-151-1/+1
| | | | Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
* 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: fix pylint C0326: wrong number of spacesClayton Smith2020-10-201-2/+2
|
* grc: remove sixClayton Smith2020-10-051-6/+3
|
* python: Remove unnecessary 'from __future__ import'Oleksandr Kravchuk2020-08-031-1/+0
| | | | | | | | | | | | | | | | 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
* grc: Add dir_select parameter typeYamakaja2020-07-231-2/+2
| | | | | | | | This commit adds a new parameter type to GNURadio Companion that allows you to select directories using a gui. This functionality is very similar to that of the previously available "file_open" and "file_save" parameter types, and mainly differs by calling GTKs file chooser with FileChooserAction.SELECT_FOLDER.
* grc: add python snippets to GRCJosh Morman2020-02-101-3/+7
| | | | | | | | | | | 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
* Update license header to SPDX formatdevnulling2020-01-271-13/+2
|
* grc: function_probe_block extra quotes with block_idJosh Morman2019-05-281-1/+1
| | | | | | | | | | Due to the way stringify_flag is called, the block_id, function_name and function_args are all given extra quotes which cause issues when generating the python source change/add new dtypes for function_probe Fixes #1783
* grc: parse suffixes for numeric valuesaru312019-02-141-0/+34
| | | | | Previously only python scientific notation was supported. Now engineering notation e.g. k,M,G is supported as input format as well.
* grc: Fix problems with option_attributesHåkon Vågsether2018-11-221-0/+5
| | | | | | Enabling the option_attributes to be accessed by the rest of the block's parameters by using a new string subtype. Also adding validation.
* grc: Improve exception handling (bare and unnecessary)Brennan Ashton2018-11-151-1/+1
|
* Remove e.message from param.pyHåkon Vågsether2018-08-181-1/+1
|
* Fix wrong GUI hintsVolker Schroer2018-08-181-1/+4
| | | | | | | grc 3.8 should treat window@index or window@index :i,j,k,l differently to what grc 3.7 does.
* grc: move some of the param checkers to separate fileSebastian Koslowski2017-11-091-116/+38
|
* grc: refactor: move Param cls to core.paramsSebastian Koslowski2017-11-081-0/+485