diff options
author | Marcus Leech | 2012-02-01 17:15:59 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-02-01 17:19:46 -0500 |
commit | 9adfc42e0296d969a498249d837e29bf46bf65a9 (patch) | |
tree | e32b77060e14fcfb1a145ce93aef450563f6a689 | |
parent | 2d80e59c2b26de65e5266b8c6fb4be118a7428a0 (diff) | |
download | gnuradio-9adfc42e0296d969a498249d837e29bf46bf65a9.tar.gz gnuradio-9adfc42e0296d969a498249d837e29bf46bf65a9.tar.bz2 gnuradio-9adfc42e0296d969a498249d837e29bf46bf65a9.zip |
uhd: fix for uhd_fft to work with basicRx d'board.
-rwxr-xr-x | gr-uhd/apps/uhd_fft.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/gr-uhd/apps/uhd_fft.py b/gr-uhd/apps/uhd_fft.py index f311a903b..7314c4759 100755 --- a/gr-uhd/apps/uhd_fft.py +++ b/gr-uhd/apps/uhd_fft.py @@ -169,17 +169,24 @@ class app_top_block(stdgui2.std_top_block): g = self.u.get_gain_range() # some configurations don't have gain control - if g.stop() > g.start(): - myform['gain'] = form.slider_field(parent=self.panel, - sizer=hbox, label="Gain", - weight=3, - min=int(g.start()), max=int(g.stop()), - callback=self.set_gain) + if g.stop() <= g.start(): + glow = 0.0 + ghigh = 1.0 + + else: + glow = g.start() + ghigh = g.stop() + + myform['gain'] = form.slider_field(parent=self.panel, + sizer=hbox, label="Gain", + weight=3, + min=int(glow), max=int(ghigh), + callback=self.set_gain) - hbox.Add((5,0), 0, 0) - vbox.Add(hbox, 0, wx.EXPAND) + hbox.Add((5,0), 0, 0) + vbox.Add(hbox, 0, wx.EXPAND) - self._build_subpanel(vbox) + self._build_subpanel(vbox) def _build_subpanel(self, vbox_arg): # build a secondary information panel (sometimes hidden) |