Skip to content
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

Apply changes from gr upstream #3

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ZakyHermawan
Copy link
Member

update gnuradio-companion repo to prepare grc separation

dl1ksv and others added 7 commits July 7, 2024 11:46
Due to an error in the yml code of the variable_struct block, this block is unusable.

Signed-off-by: Volker Schroer <[email protected]>
When os.path.join is used, it appends an extra directory to the config file path.  For
grc the config file is $HOME/.config/gnuradio/grc.conf/grc.conf and for grc qt the file is
$HOME/.config/gnuradio/grc.conf/grc_qt.conf.

This patch proposes to change this and remove the grc.conf directory from the path.  This would
make the grc config file $HOME/.config/gnuradio/grc.conf and the grc qt config file
$HOME/.config/gnuradio/grc_qt.conf.

All that is needed to accomplish this is to remove the use of os.path.join to generate the
gui_prefs_file.

Signed-off-by: Chris Gorman <[email protected]>
As the ErrorsDialog should only display the errors of the fg,
the entries should be readonly and not editable.

Signed-off-by: Volker Schroer <[email protected]>
Changing the completion mode from InlineCompletion to
PopupCompletion for the searchbar makes the intermediate
results more readable.

Signed-off-by: Volker Schroer <[email protected]>
Without this fix, GRC tries to populate a full block-property dialog
when opening a property dialog on connections. This improves the
checking for the right attributes to correctly identify connections, and
removes the following spurious output when opening property dialogs on
connections:

Traceback (most recent call last):
  File "..../grc/gui/PropsDialog.py", line 210, in update_gui
    self._update_docs_page()
  File "..../grc/gui/PropsDialog.py", line 219, in _update_docs_page
    in_tree = self._block.category and self._block.category[0] == "Core"
AttributeError: 'Connection' object has no attribute 'category'

Signed-off-by: Martin Braun <[email protected]>
Fixes the following issue: Create a port with automatic type deduction
which is *not* in the streaming domain (e.g., create an RFNoC RX
streamer block with no changes to settings from the default).

GRC will attempt to guess the dtype of this port (e.g., if it is
connected to another block that does sc16, it will now also be sc16).
However, due to the order in which objects are evaluated, the first time
this is attempted is before the connection objects are generated, which
means the auto-type deduction will fail the first time it is attempted.

The issue is, on failure, we re-set the port domain to 'stream'
unconditionally. If the port domain was anything else (e.g., as above,
'rfnoc') then it will temporarily disable any domain-specific settings
until the connection object is created, which is too late to import
connection-and-domain-specific settings.

With this change, we simply don't touch the domain when the auto-type
deduction fails.

Signed-off-by: Martin Braun <[email protected]>
grc --gtk only shows an error but displays the block

Loading: "/home/schroer/gnuradiocomponents/bugs/yaml_config.grc"
Failed to evaluate variable block yaml_config_0
Traceback (most recent call last):
  File "/usr/local/gnuradio/lib64/python3.12/site-packages/gnuradio/grc/core/FlowGraph.py", line 286, in _reload_variables
    value = eval(variable_block.value, namespace,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

grc --qt shows an error and segfaults sometimes

Failed to evaluate variable block yaml_config_0
Traceback (most recent call last):
  File "/usr/local/gnuradio/lib64/python3.12/site-packages/gnuradio/grc/core/FlowGraph.py", line 286, in _reload_variables
    value = eval(variable_block.value, namespace,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 1, in <module>
FileNotFoundError: [Errno 2] Datei oder Verzeichnis nicht gefunden: ''
Traceback (most recent call last):
  File "/usr/local/gnuradio/lib64/python3.12/site-packages/gnuradio/grc/gui_qt/components/block_library.py", line 140, in <lambda>
    lambda block: self.add_block(block.data(Qt.UserRole))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Signed-off-by: Volker Schroer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants