diff options
author | Jason Abele | 2011-11-07 17:49:00 -0800 |
---|---|---|
committer | Jason Abele | 2011-11-07 17:53:02 -0800 |
commit | 3843d13a1e417ddc76b59d165b869c293c94ecfa (patch) | |
tree | 8891ae077f428af081e2edb9bb14e57c716ce1c8 | |
parent | d539979ae3c10a7dc6284215441971249a76e13e (diff) | |
download | gnuradio-3843d13a1e417ddc76b59d165b869c293c94ecfa.tar.gz gnuradio-3843d13a1e417ddc76b59d165b869c293c94ecfa.tar.bz2 gnuradio-3843d13a1e417ddc76b59d165b869c293c94ecfa.zip |
Use start()/stop() to get midpoint of uhd ranges
-rwxr-xr-x | gr-uhd/apps/uhd_siggen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-uhd/apps/uhd_siggen.py b/gr-uhd/apps/uhd_siggen.py index 29daabda7..08efc908f 100755 --- a/gr-uhd/apps/uhd_siggen.py +++ b/gr-uhd/apps/uhd_siggen.py @@ -149,7 +149,7 @@ class top_block(gr.top_block, pubsub): def set_gain(self, gain): if gain is None: g = self[GAIN_RANGE_KEY] - gain = float(g[0]+g[1])/2 + gain = float(g.start()+g.stop())/2 if self._verbose: print "Using auto-calculated mid-point TX gain" self[GAIN_KEY] = gain @@ -162,7 +162,7 @@ class top_block(gr.top_block, pubsub): if target_freq is None: f = self[FREQ_RANGE_KEY] - target_freq = float(f[0]+f[1])/2.0 + target_freq = float(f.start()+f.stop())/2.0 if self._verbose: print "Using auto-calculated mid-point frequency" self[TX_FREQ_KEY] = target_freq |