aboutsummaryrefslogtreecommitdiffstats
path: root/grc
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-05-05 00:43:32 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-05-05 00:43:32 +0200
commit3a47e3661c616de677a813adb31e0d325f8ae0f1 (patch)
tree1989c8399eda4836f10b4dcc3a4d38ca596e3c35 /grc
parentf0ac70fa41913f607db627d209e3cc85cf9ffd6f (diff)
add api for manual gain mode control
Diffstat (limited to 'grc')
-rw-r--r--grc/gen_osmosdr_blocks.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/grc/gen_osmosdr_blocks.py b/grc/gen_osmosdr_blocks.py
index 23211e0..b1d8294 100644
--- a/grc/gen_osmosdr_blocks.py
+++ b/grc/gen_osmosdr_blocks.py
@@ -32,6 +32,7 @@ self.\$(id).set_sample_rate(\$sample_rate)
self.\$(id).set_center_freq(\$freq$(n), $n)
self.\$(id).set_freq_corr(\$corr$(n), $n)
self.\$(id).set_gain(\$gain$(n), $n)
+self.\$(id).set_gain_mode(\$gain_mode$(n), $n)
\#if \$ant$(n)()
self.\$(id).set_antenna(\$ant$(n), $n)
\#end if
@@ -43,6 +44,7 @@ self.\$(id).set_antenna(\$ant$(n), $n)
<callback>set_center_freq(\$freq$(n), $n)</callback>
<callback>set_freq_corr(\$corr$(n), $n)</callback>
<callback>set_gain(\$gain$(n), $n)</callback>
+ <callback>set_gain_mode(\$gain_mode$(n), $n)</callback>
<callback>set_antenna(\$ant$(n), $n)</callback>
#end for
<param>
@@ -125,7 +127,11 @@ Freq. Corr.:
The frequency correction factor in parts per million (ppm). Leave 0 if unknown.
Gain:
-Overall gain of the device's signal path.
+Overall gain of the device's signal path. For the gain setting to apply the
+manual gain mode must be enabled first for some devices (namely rtlsdr).
+
+Gain Mode:
+Chooses between the automatic (default) and manual gain mode where appropriate.
Antenna:
For devices with only one antenna, this may be left blank.
@@ -160,6 +166,21 @@ PARAMS_TMPL = """
<hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
</param>
<param>
+ <name>Ch$(n): Gain Mode</name>
+ <key>gain_mode$(n)</key>
+ <value></value>
+ <type>enum</type>
+ <hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
+ <option>
+ <name>Auto</name>
+ <key>0</key>
+ </option>
+ <option>
+ <name>Manual</name>
+ <key>1</key>
+ </option>
+ </param>
+ <param>
<name>Ch$(n): Antenna</name>
<key>ant$(n)</key>
<value></value>