forked from sdr/gr-osmosdr
apps: fix named gain access on osmocom_siggen_base.py
This commit is contained in:
parent
8d9e6b58bb
commit
da27f3fb0a
|
@ -201,9 +201,9 @@ class top_block(gr.top_block, pubsub):
|
||||||
print "Set gain to:", gain
|
print "Set gain to:", gain
|
||||||
|
|
||||||
if self._verbose:
|
if self._verbose:
|
||||||
gain_names = self.src.get_gain_names()
|
gain_names = self._sink.get_gain_names()
|
||||||
for name in gain_names:
|
for name in gain_names:
|
||||||
range = self.src.get_gain_range(name)
|
range = self._sink.get_gain_range(name)
|
||||||
print "%s gain range: start %d stop %d step %d" % (name, range.start(), range.stop(), range.step())
|
print "%s gain range: start %d stop %d step %d" % (name, range.start(), range.stop(), range.step())
|
||||||
|
|
||||||
if options.gains:
|
if options.gains:
|
||||||
|
@ -211,10 +211,10 @@ class top_block(gr.top_block, pubsub):
|
||||||
name, gain = tuple.split(":")
|
name, gain = tuple.split(":")
|
||||||
gain = int(gain)
|
gain = int(gain)
|
||||||
print "Setting gain %s to %d." % (name, gain)
|
print "Setting gain %s to %d." % (name, gain)
|
||||||
self.src.set_gain(gain, name)
|
self._sink.set_gain(gain, name)
|
||||||
|
|
||||||
if self._verbose:
|
if self._verbose:
|
||||||
rates = self.src.get_sample_rates()
|
rates = self._sink.get_sample_rates()
|
||||||
print 'Supported sample rates %d-%d step %d.' % (rates.start(), rates.stop(), rates.step())
|
print 'Supported sample rates %d-%d step %d.' % (rates.start(), rates.stop(), rates.step())
|
||||||
|
|
||||||
# Set the antenna
|
# Set the antenna
|
||||||
|
|
Loading…
Reference in New Issue