flow_graph.stop() seems to hang on me. This doesn't occur when I use grc, which means I most have a problem with my code. The last line of the following code is where the problem is.
Any ideas appreciated!
Justin
def write(t, filename): ''' generate and signal, transmit using usrp, then write the received data to a file t -- number of seconds to collect ''' interp = 64
waveform_type = gr.GR_SIN_WAVE waveform_ampl = 100 waveform_freq = 20e3 waveform_offset = 0 target_freq = 0e3
# connect graph
fg = gr.flow_graph() fg.connect(siggen, u) fg.connect(u_source, sink) fg.validate() fg.start() for i in range(t): time.sleep(1) print i, 'of', t
fg.stop() # <---- this line hangs!