Feature #406

correct daughterboard selection in usrp_oscope.py and usrp_fft.py

Added by Anonymous almost 4 years ago. Updated over 3 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Johnathan Corgan % Done:

100%

Category:gr-utils
Target version:to-be-decided
Resolution:

Description

The usrp_oscope.py and usrp_fft.py code always selects subdevice (0,0) if no subdevice is specified, while it claims to:
"If there's a daughterboard on A, select A.
If there's a daughterboard on B, select B.
Otherwise, select A."

The reason is that the pick_subdevice() function is broken:

def pick_subdevice(u):
"""
The user didn't specify a subdevice on the command line.
If there's a daughterboard on A, select A.
If there's a daughterboard on B, select B.
Otherwise, select A.
"""
if u.db(0, 0).dbid() >= 0: # dbid is < 0 if there's no d'board or a problem
return (0, 0)
if u.db(0, 0).dbid() >= 0:
return (1, 0)
return (0, 0)

The second if should be:
if u.db(1, 0).dbid() >= 0:

This patch fixes this for both files

correct_dboard_selection_oscope_fft.diff (921 Bytes) Anonymous, 08/24/2009 01:56 pm

History

Updated by Dimitrios Symeonidis over 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Fixed with commit 6b1bcb301ff4cb20ac62bf5400fa3001182cb069 of Feb 4, 2010

Also available in: Atom PDF