Updated scripts to work with GNU Radio 3.6 or 3.7

This commit is contained in:
Johnathan Corgan 2012-12-31 11:42:26 -08:00
parent fcb06ef25a
commit 2d8f91fd39
2 changed files with 28 additions and 5 deletions

View File

@ -22,8 +22,20 @@
import os, sys, time, threading, datetime, math, csv
from PyQt4 import QtCore,QtGui
from PyQt4.Qwt5 import Qwt
from gnuradio import gr, gru, optfir, eng_notation, blks2
from gnuradio import gr, gru, eng_notation
import gnuradio.gr.gr_threading as _threading
try:
from gnuradio import optfir
except ImportError:
from gnuradio.filter import optfir
try:
from gnuradio.blks2 import rational_resampler_ccf
except ImportError:
from gnuradio.filter import rational_resampler_ccf
import air_modes
from air_modes.exceptions import *
from air_modes.modes_rx_ui import Ui_MainWindow
@ -428,7 +440,7 @@ class adsb_rx_block (gr.top_block):
if use_resampler:
self.lpfiltcoeffs = gr.firdes.low_pass(1, 5*3.2e6, 1.6e6, 300e3)
self.resample = blks2.rational_resampler_ccf(interpolation=5, decimation=4, taps=self.lpfiltcoeffs)
self.resample = rational_resampler_ccf(interpolation=5, decimation=4, taps=self.lpfiltcoeffs)
self.connect(self.u, self.resample, self.rx_path)
else:
self.connect(self.u, self.rx_path)

View File

@ -21,13 +21,24 @@
my_position = None
from gnuradio import gr, gru, optfir, eng_notation, blks2
from gnuradio import gr, gru, eng_notation
from gnuradio.eng_option import eng_option
import gnuradio.gr.gr_threading as _threading
try:
from gnuradio import optfir
except ImportError:
from gnuradio.filter import optfir
try:
from gnuradio.blks2 import rational_resampler_ccf
except ImportError:
from gnuradio.filter import rational_resampler_ccf
from optparse import OptionParser
import time, os, sys, threading
from string import split, join
import air_modes
import gnuradio.gr.gr_threading as _threading
import csv
from air_modes.exceptions import *
@ -114,7 +125,7 @@ class adsb_rx_block (gr.top_block):
if use_resampler:
self.lpfiltcoeffs = gr.firdes.low_pass(1, 5*3.2e6, 1.6e6, 300e3)
self.resample = blks2.rational_resampler_ccf(interpolation=5, decimation=4, taps=self.lpfiltcoeffs)
self.resample = rational_resampler_ccf(interpolation=5, decimation=4, taps=self.lpfiltcoeffs)
self.connect(self.u, self.resample, self.rx_path)
else:
self.connect(self.u, self.rx_path)