[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/03: Revert "Revert "uhd: Rearranged GRC
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/03: Revert "Revert "uhd: Rearranged GRC bindings for USRP blocks"" |
Date: |
Mon, 7 Sep 2015 23:55:20 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit c0bd17b4279f4b8f8ab71acf89418ff955827b4d
Author: Martin Braun <address@hidden>
Date: Mon Sep 7 09:50:10 2015 -0700
Revert "Revert "uhd: Rearranged GRC bindings for USRP blocks""
This reverts commit 5d29a17c12d19ebc5f4494b8ae1be77568b235e7.
Well, also fixes a bug where older FGs would throw a template
error.
---
gr-uhd/grc/gen_uhd_usrp_blocks.py | 115 ++++++++++++++++++++++++++++++++++----
1 file changed, 104 insertions(+), 11 deletions(-)
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py
b/gr-uhd/grc/gen_uhd_usrp_blocks.py
index 72f1b50..4193857 100644
--- a/gr-uhd/grc/gen_uhd_usrp_blocks.py
+++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py
@@ -81,6 +81,14 @@ self.\$(id).set_antenna(\$ant$(n), $n)
\#if \$bw$(n)()
self.\$(id).set_bandwidth(\$bw$(n), $n)
\#end if
+#if $sourk == 'source'
+ \#if \$dc_offs_enb$(n)()
+self.\$(id).set_rx_dc_offset(\$dc_offs_enb$(n), $n)
+ \#end if
+ \#if \$iq_imbal_enb$(n)()
+self.\$(id).set_rx_iq_balance(\$iq_imbal_enb$(n), $n)
+ \#end if
+#end if
\#end if
#end for
</make>
@@ -92,7 +100,7 @@ self.\$(id).set_normalized_gain(\$gain$(n), $n)
\#else
self.\$(id).set_gain(\$gain$(n), $n)
\#end if
-</callback>
+ </callback>
<callback>set_antenna(\$ant$(n), $n)</callback>
<callback>set_bandwidth(\$bw$(n), $n)</callback>
#end for
@@ -137,6 +145,10 @@ self.\$(id).set_gain(\$gain$(n), $n)
<key>sc16</key>
</option>
<option>
+ <name>Complex int12</name>
+ <key>sc12</key>
+ </option>
+ <option>
<name>Complex int8</name>
<key>sc8</key>
</option>
@@ -226,6 +238,22 @@ self.\$(id).set_gain(\$gain$(n), $n)
<name>Default</name>
<key>0.0</key>
</option>
+ <option>
+ <name>200 MHz</name>
+ <key>200e6</key>
+ </option>
+ <option>
+ <name>184.32 MHz</name>
+ <key>184.32e6</key>
+ </option>
+ <option>
+ <name>120 MHz</name>
+ <key>120e6</key>
+ </option>
+ <option>
+ <name>30.72 MHz</name>
+ <key>30.72e6</key>
+ </option>
</param>
<param>
<name>Num Mboards</name>
@@ -327,7 +355,8 @@ self.\$(id).set_gain(\$gain$(n), $n)
<sink>
<name>command</name>
<type>message</type>
- <optional>1</optional>
+ <optional>1</optional>
+ <hide>\$hide_cmd_port</hide>
</sink>
<$sourk>
<name>$direction</name>
@@ -413,20 +442,21 @@ http://code.ettus.com/redmine/ettus/projects/uhd/wiki
</block>
"""
-PARAMS_TMPL = """
- <param>
+PARAMS_TMPL = """ <param>
<name>Ch$(n): Center Freq (Hz)</name>
<key>center_freq$(n)</key>
<value>0</value>
<type>real</type>
<hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
+ <tab>RF Options</tab>
</param>
<param>
- <name>Ch$(n): Gain Value</name>
+ <name>Ch$(n): Gain Value</name>
<key>gain$(n)</key>
<value>0</value>
<type>float</type>
<hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
+ <tab>RF Options</tab>
</param>
<param>
<name>Ch$(n): Gain Type</name>
@@ -448,6 +478,7 @@ PARAMS_TMPL = """
<name>Normalized</name>
<key>True</key>
</option>
+ <tab>RF Options</tab>
</param>
<param>
<name>Ch$(n): Antenna</name>
@@ -463,6 +494,17 @@ PARAMS_TMPL = """
part
\#end if
</hide>
+#if $sourk == 'sink'
+ <option>
+ <name>TX/RX</name>
+ <key>TX/RX</key>
+ </option>
+#end if
+ <option>
+ <name>RX2</name>
+ <key>RX2</key>
+ </option>
+ <tab>RF Options</tab>
</param>
<param>
<name>Ch$(n): Bandwidth (Hz)</name>
@@ -478,18 +520,68 @@ PARAMS_TMPL = """
part
\#end if
</hide>
+ <tab>RF Options</tab>
+ </param>
+#if $sourk == 'source'
+ <param>
+ <name>Ch$(n): Enable DC Offset Correction</name>
+ <key>dc_offs_enb$(n)</key>
+ <value>""</value>
+ <type>raw</type>
+ <hide>
+ \#if not \$nchan() > $n
+ all
+ \#else
+ part
+ \#end if
+ </hide>
+ <tab>FE Corrections</tab>
+ </param>
+ <param>
+ <name>Ch$(n): Enable IQ Imbalance Correction</name>
+ <key>iq_imbal_enb$(n)</key>
+ <value>""</value>
+ <type>raw</type>
+ <hide>
+ \#if not \$nchan() > $n
+ all
+ \#else
+ part
+ \#end if
+ </hide>
+ <tab>FE Corrections</tab>
+ </param>
+#end if
+"""
+
+SHOW_CMD_PORT_PARAM = """
+ <param>
+ <name>Show Command Port</name>
+ <key>hide_cmd_port</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Yes</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>True</key>
+ </option>
+ <tab>Advanced</tab>
</param>
"""
-LENTAG_PARAM = """ <param>
- <name>Length tag name</name>
+TSBTAG_PARAM = """ <param>
+ <name>TSB tag name</name>
<key>len_tag_name</key>
<value></value>
<type>string</type>
<hide>\#if len(str(\$len_tag_name())) then 'none' else
'part'#</hide>
</param>"""
-LENTAG_ARG = """
+TSBTAG_ARG = """
#if $len_tag_name()
$len_tag_name,
#end if"""
@@ -512,10 +604,11 @@ if __name__ == '__main__':
direction = 'in'
else: raise Exception, 'is %s a source or sink?'%file
- params = ''.join([parse_tmpl(PARAMS_TMPL, n=n) for n in
range(max_num_channels)])
+ params = ''.join([parse_tmpl(PARAMS_TMPL, n=n, sourk=sourk) for
n in range(max_num_channels)])
+ params += SHOW_CMD_PORT_PARAM
if sourk == 'sink':
- params += LENTAG_PARAM
- lentag_arg = LENTAG_ARG
+ params += TSBTAG_PARAM
+ lentag_arg = TSBTAG_ARG
else: lentag_arg = ''
open(file, 'w').write(parse_tmpl(MAIN_TMPL,
lentag_arg=lentag_arg,