How to remove 'Data 0 / Min hold / Max hold' legends from plots ?

2022-08-19 Thread Kimmo Lehtinen
Hi 

How can I remove the 'Data 0 / Min hold / Max hold'  legends which are always 
at the right side of QT GUI vector sink plots ?
I found a possible solution at 
https://www.trondeau.com/blog/2015/4/9/qtgui-tools-and-tips
where it is told that 
'In the GRC properties box under the Config tab for each QTGUI plotter, we can 
toggle the legend on or off. 'However, I do not have such a possibility in the 
config tab. 

I am using GRC 3.9.5.0 in Ubuntu 20.04.4 LTS 

Any ideas ?
Cheers, Kimmo 






Printing from within an embedded Python program

2022-08-19 Thread Kimmo Lehtinen

Hi 

I am using an embedded Python program to take an average of a large number of 
spectra. 
I want to continuously print the number of averaged spectra so that output 
happens on a same line, always overwriting the previous number. So not printing 
each number on a separate line. 

In Python you can do it in the following way:
>for i in range(10):...   print('Number of spectra averaged  ', i, end='\r')
However, that does not work from within an embedded Python program, each number 
is on its own line, which is very time consuming. 

How to print on a same line, overwriting previous output ?I am using GRC 
3.9.5.0 (Python 3.8.10) on Ubuntu 12.04.4

Cheers, Kimmo 




crosscompiled GR - bad_weak_ptr in gr::hier_block2

2022-08-19 Thread Suciu, Adrian
Hello everyone,

I'm running a pretty experimental version of Gnuradio on Android.  The python 
console is working correctly, I can instantiate regular blocks, connect them 
around and run them, but when I instantiate hierarchical blocks, I get the 
following exception:

Traceback (most recent call last):
  File "/data/user/0/org. 
adi.grflowgraphrunner/cache/lib/python3.10/grflow.py,line 188, in _init.
self.analog_nbfm_rx_0=analog.nbfm_rx(
  
File"/data/user/0/org.adi.grflowgraphrunner/cache/lib/python3.10/site-packages/gnuradio/analog/nbfm_rx.py",line64,in_init_
self.deemph = fm_deemph(quad_rate, tau=tau)
  
File"/data/user/O/org.adi.grflowgraphrunner/cache/lib/python3.10/site-packages/gnuradio/analog/fm_emph.py",line121,in_init_
self.connect(self, deemph, self)
  File "/data/user/0/org. 
adi.grflowgraphrunner/cache/lib/python3.10/site-packages/gnuradio/gr/hier_block2.py",line34,inwrapped
endp = (p.to_basic_block0, 0) if hasattr(p, 'to basic block')
  
File"/data/user/0/org.adi.grflowgraphrunner/cache/lib/python3.10/site-packages/gnuradio/gr/hier_block2.py",line34,in
endp = [(p.to_basic_block0, O) if hasattr(p, 'to_basic_block)
RuntimeError: bad_weak_ptr

As far as I can tell, the C++ to_basic_block gets called, and throws the error 
from within shared_from_this(). I'm not sure however if it's called on the 
correct block, or a new instance is created, or ... ?
The script isn't anything too crazy, a simple flowgraph with a NBFM receiver 
connected to a pluto source - it is generated from the companion. Other hier 
blocks exhibit the same behavior as far as I've tested.

Anyone know what might be wrong here ?

For reference: gnuradio is buit from the latest master, pybind11 with the 
latest master, python 3.10 using android-ndk r23.
-Adrian