mirror of
https://github.com/gnuradio/gnuradio-companion.git
synced 2025-12-10 00:42:30 -06:00
grc: function probe waits for flowgraph initialization
Wait until the flowgraph is done initializing before running the probe loop. The real problem had to do with referencing a variable that may not have been created yet, due to the ordering of autogenerated code. Waiting until the flowgraph has been started ensures that everything has been initialized. Signed-off-by: Jeff Long <willcode4@gmail.com>
This commit is contained in:
parent
697fcbf14c
commit
e5b06f6ef5
@ -33,6 +33,7 @@ templates:
|
|||||||
var_make: self.${id} = ${id} = ${value}
|
var_make: self.${id} = ${id} = ${value}
|
||||||
make: |+
|
make: |+
|
||||||
def _${id}_probe():
|
def _${id}_probe():
|
||||||
|
self.flowgraph_started.wait()
|
||||||
while True:
|
while True:
|
||||||
<% obj = 'self' + ('.' + block_id if block_id else '') %>
|
<% obj = 'self' + ('.' + block_id if block_id else '') %>
|
||||||
val = ${obj}.${function_name}(${function_args})
|
val = ${obj}.${function_name}(${function_args})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user