diff options
author | Jason Abele <jason@ettus.com> | 2011-11-07 17:18:34 -0800 |
---|---|---|
committer | Jason Abele <jason@ettus.com> | 2011-11-07 17:18:34 -0800 |
commit | d539979ae3c10a7dc6284215441971249a76e13e (patch) | |
tree | caf1e20e36340a6e6a720ae2b24cc72ab5dbbcb3 /gr-uhd/apps | |
parent | bba957122090331181d7e27f22bc05934adba608 (diff) |
Set subdev spec after creating uhd source, before threads start
Allows for more graceful exit when invalid subdev spec is used
Diffstat (limited to 'gr-uhd/apps')
-rwxr-xr-x | gr-uhd/apps/uhd_fft.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gr-uhd/apps/uhd_fft.py b/gr-uhd/apps/uhd_fft.py index 7f529a5284..eec709c144 100755 --- a/gr-uhd/apps/uhd_fft.py +++ b/gr-uhd/apps/uhd_fft.py @@ -78,6 +78,10 @@ class app_top_block(stdgui2.std_top_block): io_type=uhd.io_type.COMPLEX_FLOAT32, num_channels=1) + # Set the subdevice spec + if(options.spec): + self.u.set_subdev_spec(options.spec, 0) + self.u.set_samp_rate(options.samp_rate) input_rate = self.u.get_samp_rate() @@ -119,10 +123,6 @@ class app_top_block(stdgui2.std_top_block): self.set_gain(options.gain) - # Set the subdevice spec - if(options.spec): - self.u.set_subdev_spec(options.spec, 0) - # Set the antenna if(options.antenna): self.u.set_antenna(options.antenna, 0) |