Skip to content

Commit

Permalink
gsm_receive_usrp: use usrp.pick_rx_subdev()
Browse files Browse the repository at this point in the history
  • Loading branch information
laf0rge committed Nov 24, 2010
1 parent a401f31 commit d208f68
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions gsm-receiver/src/python/gsm_receive_usrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
sys.path.append(extdir)
import gsm

def pick_subdevice(u):
if u.db[0][0].dbid() >= 0:
return (0, 0)
if u.db[1][0].dbid() >= 0:
return (1, 0)
return (0, 0)

class tuner(gr.feval_dd):
def __init__(self, top_block):
gr.feval_dd.__init__(self)
Expand All @@ -44,6 +37,7 @@ def __init__(self):
gr.top_block.__init__(self)
(options, args) = self._process_options()
self.tuner_callback = tuner(self)
self.synchronizer_callback = synchronizer(self)
self.options = options
self.args = args
self._set_rates()
Expand All @@ -68,7 +62,7 @@ def _set_source(self):
self.usrp = usrp.source_c(decim_rate=options.decim, fusb_block_size=fusb_block_size, fusb_nblocks=fusb_nblocks)

if options.rx_subdev_spec is None:
options.rx_subdev_spec = pick_subdevice(self.usrp)
options.rx_subdev_spec = usrp.pick_rx_subdevice(self.usrp)

self.usrp.set_mux(usrp.determine_rx_mux_value(self.usrp, options.rx_subdev_spec))
# determine the daughterboard subdevice
Expand Down

0 comments on commit d208f68

Please sign in to comment.