From af9a3aaedc969ed2893f3f598018e43d14be2fe8 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 3 Aug 2014 17:27:16 -0400 Subject: [PATCH] ifile fixes --- op25/gr-op25_repeater/apps/scope.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/op25/gr-op25_repeater/apps/scope.py b/op25/gr-op25_repeater/apps/scope.py index 9162db0..f82ffbb 100755 --- a/op25/gr-op25_repeater/apps/scope.py +++ b/op25/gr-op25_repeater/apps/scope.py @@ -150,7 +150,10 @@ class p25_rx_block (stdgui2.std_top_block): self.src.set_gain(gain, name) rates = self.src.get_sample_rates() - print 'supported sample rates %d-%d step %d' % (rates.start(), rates.stop(), rates.step()) + try: + print 'supported sample rates %d-%d step %d' % (rates.start(), rates.stop(), rates.step()) + except: + pass # ignore if options.freq_corr: self.src.set_freq_corr(options.freq_corr) @@ -1067,8 +1070,8 @@ class p25_rx_block (stdgui2.std_top_block): rc = ifile.seek(file_seek*1024, gr.SEEK_SET) assert rc == True #print "seek: %d, rc = %d" % (file_seek, rc) - throttle = gr.throttle(gr.sizeof_gr_complex, speed) - self.source = gr.multiply_const_cc(gain) + throttle = blocks.throttle(gr.sizeof_gr_complex, speed) + self.source = blocks.multiply_const_cc(gain) self.connect(ifile, throttle, self.source) self.__set_rx_from_audio(speed) self._set_titlebar("Playing")