discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is it possible to update the 'QT GUI Label' when flowgraph is running ?


From: Kimmo Lehtinen
Subject: Is it possible to update the 'QT GUI Label' when flowgraph is running ?
Date: Wed, 24 Aug 2022 11:17:43 +0000 (UTC)

Hi

I have the following setup in GRC:

1) I use the 'Import' block to import Python functions.
I have a file my_functions.py which contains several functions, like function_a, function_b and so on.     In the 'Import' block I have 'import my_functions'.

2) In the 'Variable' block the 'Value' parameter is calculated as
my_functions.function_a(parameter_1, parameter_2,..., parameter_n)
The ID of this variable is 'variable_a'

3) I use the 'QT GUI Label' block to have a label widget for this variable

This works fine.
However, I would like to update the QT GUI Label when the flowgraph is running.
Thus, I am trying to use the 'Function Probe' block with the following setup:

ID:                          function_probe    
Block ID:                variable_a
Function Name:     my_functions.function_a
Function Args:       1,2,3,4...

But then 'Function Probe' complains that

Param - Function Name(function_name):
    ID "my_functions.function_a" must begin with a letter and may contain letters, numbers, and underscores.

If in the 'Function Probe' block I have
Function Name:     function_a
the flowgraph runs but there is an error:

val = self.function_a.function_a(parameter_1,...,parameter_n)
AttributeError:
'numpy.float64' object has no attribute 'function_a'

What is the correct way to use 'Function Probe' block in this case ?
Or is it even possible ?

I am using  GRC 3.9.5.0 (Python 3.8.10)

cheers, Kimmo






reply via email to

[Prev in Thread] Current Thread [Next in Thread]