Forum: GNU Radio GRC - python code generation quirk for Function Probe with empty BlockID

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D4152203c4ab14e67f510a4bccf7691c?d=identicon&s=25 Darren Long (Guest)
on 2014-04-25 18:46
(Received via mailing list)

I've been pottering around in GRC trying to get a pair of function
probe's to update the QT fosphor GUI sink's centre frequency by calling

self.set_freq(float(subprocess.check_output(['/usr/bin/rigctl', '-m',
'2', 'f']).strip()))

at 5Hz and


at 20Hz.

This seems to work, except for the fact that the GRC python generator
generates the following lines of code instead of that I've shown above:

val = self..set_freq(float(subprocess.check_output(['/usr/bin/rigctl',
'-m', '2', 'f']).strip()))


val = self..set_samp_rate(self.samp_rate)

Note the pair of dots in those lines.  This occurs because the Block ID
in the function probe is empty, in that I want the block ID to refer to
the top block, i.e. self.  I can't put "self" as the Block ID, as the
generated code is "self.self" which Python moans about.  leaving the
BlockID empty creates the pair of dots.

I wonder if GRC could/should be modified to suppress the extra generated
dot if the Block ID is empty?  It would certainly help me to avoid
editing generated code :)


Darren, G0HWW
This topic is locked and can not be replied to.