summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjblum2009-02-02 22:02:18 +0000
committerjblum2009-02-02 22:02:18 +0000
commit4a0dc4d161e9f1a615808aee7a59d056beef30dc (patch)
tree17100cf6f73d7ebbeb43c742cb045e6ac55cfc4b
parent40d6c72b9b62f7074a0607479b6a093f66c7c364 (diff)
downloadgnuradio-4a0dc4d161e9f1a615808aee7a59d056beef30dc.tar.gz
gnuradio-4a0dc4d161e9f1a615808aee7a59d056beef30dc.tar.bz2
gnuradio-4a0dc4d161e9f1a615808aee7a59d056beef30dc.zip
removed auto tr from sources, combined auto tr with transmit options in sinks
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10376 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r--grc/data/platforms/python/blocks/usrp_dual_sink_x.xml104
-rw-r--r--grc/data/platforms/python/blocks/usrp_dual_source_x.xml56
-rw-r--r--grc/data/platforms/python/blocks/usrp_simple_sink_x.xml56
-rw-r--r--grc/data/platforms/python/blocks/usrp_simple_source_x.xml24
-rw-r--r--grc/src/grc_gnuradio/usrp/dual_usrp.py2
-rw-r--r--grc/src/grc_gnuradio/usrp/simple_usrp.py1
6 files changed, 58 insertions, 185 deletions
diff --git a/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml b/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
index 5644759cb..639737de4 100644
--- a/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
+++ b/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
@@ -20,20 +20,20 @@ self.$(id).set_gain_b($gain_b)
##################################################
## Flex RF A
##################################################
-#if $tx_enb_a.eval
-self.$(id).set_enable_a($tx_enb_a)
+#if $transmit_a.tx_enb
+self.$(id).set_enable_a(True)
#end if
-#if $auto_tr_a.eval and $tx_enb_a.eval
-self.$(id).set_auto_tr_a($auto_tr_a)
+#if $transmit_a.auto_tr
+self.$(id).set_auto_tr_a(True)
#end if
##################################################
## Flex RF B
##################################################
-#if $tx_enb_b.eval
-self.$(id).set_enable_b($tx_enb_b)
+#if $transmit_b.tx_enb
+self.$(id).set_enable_b(True)
#end if
-#if $auto_tr_b.eval and $tx_enb_b.eval
-self.$(id).set_auto_tr_b($auto_tr_b)
+#if $transmit_b.auto_tr
+self.$(id).set_auto_tr_b(True)
#end if</make>
<callback>set_interp_rate($interpolation)</callback>
<callback>set_frequency_a($frequency_a)</callback>
@@ -111,44 +111,28 @@ self.$(id).set_auto_tr_b($auto_tr_b)
###################################################
-->
<param>
- <name>TX Enable A</name>
- <key>tx_enb_a</key>
+ <name>Transmit A</name>
+ <key>transmit_a</key>
<value></value>
<type>enum</type>
- <hide>$tx_enb_a.hide</hide>
+ <hide>#if $transmit_a.tx_enb then 'none' else 'part'#</hide>
<option>
<name>Unconfigured</name>
<key></key>
- <opt>hide:part</opt>
+ <opt>tx_enb:</opt>
+ <opt>auto_tr:</opt>
</option>
<option>
<name>Enable</name>
- <key>True</key>
- <opt>hide:none</opt>
+ <key>tx_enb</key>
+ <opt>tx_enb:1</opt>
+ <opt>auto_tr:</opt>
</option>
<option>
- <name>Disable</name>
- <key>False</key>
- <opt>hide:none</opt>
- </option>
- </param>
- <param>
- <name>Auto T/R A</name>
- <key>auto_tr_a</key>
- <value></value>
- <type>enum</type>
- <hide>#if $tx_enb_a.eval then 'none' else 'all'#</hide>
- <option>
- <name>Auto</name>
- <key></key>
- </option>
- <option>
- <name>Enable</name>
- <key>True</key>
- </option>
- <option>
- <name>Disable</name>
- <key>False</key>
+ <name>Auto T/R</name>
+ <key>auto_tr</key>
+ <opt>tx_enb:1</opt>
+ <opt>auto_tr:1</opt>
</option>
</param>
<!--
@@ -157,44 +141,28 @@ self.$(id).set_auto_tr_b($auto_tr_b)
###################################################
-->
<param>
- <name>TX Enable B</name>
- <key>tx_enb_b</key>
+ <name>Transmit B</name>
+ <key>transmit_b</key>
<value></value>
<type>enum</type>
- <hide>$tx_enb_b.hide</hide>
+ <hide>#if $transmit_b.tx_enb then 'none' else 'part'#</hide>
<option>
<name>Unconfigured</name>
<key></key>
- <opt>hide:part</opt>
+ <opt>tx_enb:</opt>
+ <opt>auto_tr:</opt>
</option>
<option>
<name>Enable</name>
- <key>True</key>
- <opt>hide:none</opt>
+ <key>tx_enb</key>
+ <opt>tx_enb:1</opt>
+ <opt>auto_tr:</opt>
</option>
<option>
- <name>Disable</name>
- <key>False</key>
- <opt>hide:none</opt>
- </option>
- </param>
- <param>
- <name>Auto T/R B</name>
- <key>auto_tr_b</key>
- <value></value>
- <type>enum</type>
- <hide>#if $tx_enb_b.eval then 'none' else 'all'#</hide>
- <option>
- <name>Auto</name>
- <key></key>
- </option>
- <option>
- <name>Enable</name>
- <key>True</key>
- </option>
- <option>
- <name>Disable</name>
- <key>False</key>
+ <name>Auto T/R</name>
+ <key>auto_tr</key>
+ <opt>tx_enb:1</opt>
+ <opt>auto_tr:1</opt>
</option>
</param>
<sink>
@@ -208,10 +176,8 @@ self.$(id).set_auto_tr_b($auto_tr_b)
<doc>
The USRP sink inputs 128 Megasamples per second / interpolation.
-Flex RF boards only: The "Transmit Enable" configures the transmitter to be on or off. \
-Do not leave this unconfigured.
-
-Flex RF boards only: If enabled, "Auto Transmit/Receive Switching" handles the preference for transmit packets vs receive packets. \
-By default, "Auto TR" is disabled.
+Flex RF boards only: The "Transmit Setting" must be configured. \
+When set to "Enable" the transmitter is always on. \
+When set to "Auto Transmit/Receive", the transmitter is disabled while receiving.
</doc>
</block>
diff --git a/grc/data/platforms/python/blocks/usrp_dual_source_x.xml b/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
index e6617889c..c37ae877c 100644
--- a/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
+++ b/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
@@ -16,19 +16,7 @@ self.$(id).set_decim_rate($decimation)
self.$(id).set_frequency_a($frequency_a, verbose=True)
self.$(id).set_frequency_b($frequency_b, verbose=True)
self.$(id).set_gain_a($gain_a)
-self.$(id).set_gain_b($gain_b)
-##################################################
-## Flex RF A
-##################################################
-#if $auto_tr_a.eval and $rx_ant_a.flex
-self.$(id).set_auto_tr_a($auto_tr_a)
-#end if
-##################################################
-## Flex RF B
-##################################################
-#if $auto_tr_b.eval and $rx_ant_b.flex
-self.$(id).set_auto_tr_b($auto_tr_b)
-#end if</make>
+self.$(id).set_gain_b($gain_b)</make>
<callback>set_decim_rate($decimation)</callback>
<callback>set_frequency_a($frequency_a)</callback>
<callback>set_frequency_b($frequency_b)</callback>
@@ -101,7 +89,7 @@ self.$(id).set_auto_tr_b($auto_tr_b)
</param>
<!--
###################################################
-## Flex RF A
+## Antenna A
###################################################
-->
<param>
@@ -144,28 +132,9 @@ self.$(id).set_auto_tr_b($auto_tr_b)
<opt>flex:</opt>
</option>
</param>
- <param>
- <name>Auto T/R A</name>
- <key>auto_tr_a</key>
- <value></value>
- <type>enum</type>
- <hide>#if $rx_ant_a.flex then 'none' else 'all'#</hide>
- <option>
- <name>Auto</name>
- <key></key>
- </option>
- <option>
- <name>Enable</name>
- <key>True</key>
- </option>
- <option>
- <name>Disable</name>
- <key>False</key>
- </option>
- </param>
<!--
###################################################
-## Flex RF B
+## Antenna B
###################################################
-->
<param>
@@ -208,25 +177,6 @@ self.$(id).set_auto_tr_b($auto_tr_b)
<opt>flex:</opt>
</option>
</param>
- <param>
- <name>Auto T/R B</name>
- <key>auto_tr_b</key>
- <value></value>
- <type>enum</type>
- <hide>#if $rx_ant_b.flex then 'none' else 'all'#</hide>
- <option>
- <name>Auto</name>
- <key></key>
- </option>
- <option>
- <name>Enable</name>
- <key>True</key>
- </option>
- <option>
- <name>Disable</name>
- <key>False</key>
- </option>
- </param>
<check>'$rx_ant_a' != '$rx_ant_b'</check>
<source>
<name>Aout</name>
diff --git a/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml b/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
index d0a9287b6..e88fcd7e4 100644
--- a/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
+++ b/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
@@ -15,11 +15,11 @@ self.$(id).set_format(width=$format.width, shift=$format.shift)
self.$(id).set_interp_rate($interpolation)
self.$(id).set_frequency($frequency, verbose=True)
self.$(id).set_gain($gain)
-#if $tx_enb.eval
-self.$(id).set_enable($tx_enb)
+#if $transmit.tx_enb
+self.$(id).set_enable(True)
#end if
-#if $auto_tr.eval and $tx_enb.eval
-self.$(id).set_auto_tr($auto_tr)
+#if $transmit.auto_tr
+self.$(id).set_auto_tr(True)
#end if</make>
<callback>set_interp_rate($interpolation)</callback>
<callback>set_frequency($frequency)</callback>
@@ -94,44 +94,28 @@ self.$(id).set_auto_tr($auto_tr)
</option>
</param>
<param>
- <name>TX Enable</name>
- <key>tx_enb</key>
+ <name>Transmit</name>
+ <key>transmit</key>
<value></value>
<type>enum</type>
- <hide>$tx_enb.hide</hide>
+ <hide>#if $transmit.tx_enb then 'none' else 'part'#</hide>
<option>
<name>Unconfigured</name>
<key></key>
- <opt>hide:part</opt>
+ <opt>tx_enb:</opt>
+ <opt>auto_tr:</opt>
</option>
<option>
<name>Enable</name>
- <key>True</key>
- <opt>hide:none</opt>
+ <key>tx_enb</key>
+ <opt>tx_enb:1</opt>
+ <opt>auto_tr:</opt>
</option>
<option>
- <name>Disable</name>
- <key>False</key>
- <opt>hide:none</opt>
- </option>
- </param>
- <param>
- <name>Auto T/R</name>
- <key>auto_tr</key>
- <value></value>
- <type>enum</type>
- <hide>#if $tx_enb.eval then 'none' else 'all'#</hide>
- <option>
- <name>Auto</name>
- <key></key>
- </option>
- <option>
- <name>Enable</name>
- <key>True</key>
- </option>
- <option>
- <name>Disable</name>
- <key>False</key>
+ <name>Auto T/R</name>
+ <key>auto_tr</key>
+ <opt>tx_enb:1</opt>
+ <opt>auto_tr:1</opt>
</option>
</param>
<sink>
@@ -141,10 +125,8 @@ self.$(id).set_auto_tr($auto_tr)
<doc>
The USRP sink inputs 128 Megasamples per second / interpolation.
-Flex RF boards only: The "Transmit Enable" configures the transmitter to be on or off. \
-Do not leave this unconfigured.
-
-Flex RF boards only: If enabled, "Auto Transmit/Receive Switching" handles the preference for transmit packets vs receive packets. \
-By default, "Auto TR" is disabled.
+Flex RF boards only: The "Transmit Setting" must be configured. \
+When set to "Enable" the transmitter is always on. \
+When set to "Auto Transmit/Receive", the transmitter is disabled while receiving.
</doc>
</block>
diff --git a/grc/data/platforms/python/blocks/usrp_simple_source_x.xml b/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
index cd2bf9d50..3fe6566d9 100644
--- a/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
+++ b/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
@@ -14,10 +14,7 @@ self.$(id).set_format(width=$format.width, shift=$format.shift)
#end if
self.$(id).set_decim_rate($decimation)
self.$(id).set_frequency($frequency, verbose=True)
-self.$(id).set_gain($gain)
-#if $auto_tr.eval and $rx_ant.flex
-self.$(id).set_auto_tr($auto_tr)
-#end if</make>
+self.$(id).set_gain($gain)</make>
<callback>set_decim_rate($decimation)</callback>
<callback>set_frequency($frequency)</callback>
<callback>set_gain($gain)</callback>
@@ -117,25 +114,6 @@ self.$(id).set_auto_tr($auto_tr)
</option>
</param>
<param>
- <name>Auto T/R</name>
- <key>auto_tr</key>
- <value></value>
- <type>enum</type>
- <hide>#if $rx_ant.flex then 'none' else 'all'#</hide>
- <option>
- <name>Auto</name>
- <key></key>
- </option>
- <option>
- <name>Enable</name>
- <key>True</key>
- </option>
- <option>
- <name>Disable</name>
- <key>False</key>
- </option>
- </param>
- <param>
<name>Halfband Filters</name>
<key>hb_filters</key>
<value></value>
diff --git a/grc/src/grc_gnuradio/usrp/dual_usrp.py b/grc/src/grc_gnuradio/usrp/dual_usrp.py
index f95497cda..dd1e4605e 100644
--- a/grc/src/grc_gnuradio/usrp/dual_usrp.py
+++ b/grc/src/grc_gnuradio/usrp/dual_usrp.py
@@ -76,8 +76,6 @@ class _dual_source(gr.hier_block2):
)
def set_gain_a(self, gain): self._subdev_a.set_gain(gain)
def set_gain_b(self, gain): self._subdev_b.set_gain(gain)
- def set_auto_tr_a(self, auto_tr): self._subdev_a.set_auto_tr(auto_tr)
- def set_auto_tr_b(self, auto_tr): self._subdev_b.set_auto_tr(auto_tr)
class dual_source_c(_dual_source, common.usrp_source_c): pass
class dual_source_s(_dual_source, common.usrp_source_s): pass
diff --git a/grc/src/grc_gnuradio/usrp/simple_usrp.py b/grc/src/grc_gnuradio/usrp/simple_usrp.py
index cc1938a07..819a01c2c 100644
--- a/grc/src/grc_gnuradio/usrp/simple_usrp.py
+++ b/grc/src/grc_gnuradio/usrp/simple_usrp.py
@@ -64,7 +64,6 @@ class _simple_source(gr.hier_block2):
verbose=verbose,
)
def set_gain(self, gain): self._subdev.set_gain(gain)
- def set_auto_tr(self, auto_tr): self._subdev.set_auto_tr(auto_tr)
class simple_source_c(_simple_source, common.usrp_source_c): pass
class simple_source_s(_simple_source, common.usrp_source_s): pass