summaryrefslogtreecommitdiff
path: root/grc/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'grc/blocks')
-rw-r--r--grc/blocks/usrp2_sink_xxxx.xml13
-rw-r--r--grc/blocks/usrp2_source_xxxx.xml13
-rw-r--r--grc/blocks/usrp_dual_sink_x.xml26
-rw-r--r--grc/blocks/usrp_dual_source_x.xml28
-rw-r--r--grc/blocks/usrp_simple_sink_x.xml16
-rw-r--r--grc/blocks/usrp_simple_source_x.xml16
6 files changed, 73 insertions, 39 deletions
diff --git a/grc/blocks/usrp2_sink_xxxx.xml b/grc/blocks/usrp2_sink_xxxx.xml
index 639f96cf4..f2ee4d151 100644
--- a/grc/blocks/usrp2_sink_xxxx.xml
+++ b/grc/blocks/usrp2_sink_xxxx.xml
@@ -2,6 +2,7 @@
<!--
###################################################
##USRP2 Sink
+## Note: the center freq must be set after the lo offset
###################################################
-->
<block>
@@ -16,14 +17,16 @@ usrp2.sink_$(type.fcn)($interface)
usrp2.sink_$(type.fcn)($interface, $mac_addr)
#end if
self.$(id).set_interp($interpolation)
-self.$(id).set_center_freq($frequency)
-self.$(id).set_gain($gain)
#if $lo_offset() != float('inf')
self.$(id).set_lo_offset($lo_offset)
-#end if</make>
- <callback>set_lo_offset($lo_offset)</callback>
+#end if
+self.$(id).set_center_freq($frequency)
+self.$(id).set_gain($gain)</make>
<callback>set_interp($interpolation)</callback>
- <callback>set_center_freq($frequency)</callback>
+ <callback>#if $lo_offset() != float('inf')
+self.$(id).set_lo_offset($lo_offset)
+#end if
+self.$(id).set_center_freq($frequency)</callback>
<callback>set_gain($gain)</callback>
<param>
<name>Output Type</name>
diff --git a/grc/blocks/usrp2_source_xxxx.xml b/grc/blocks/usrp2_source_xxxx.xml
index 6c776d0ad..02046e609 100644
--- a/grc/blocks/usrp2_source_xxxx.xml
+++ b/grc/blocks/usrp2_source_xxxx.xml
@@ -2,6 +2,7 @@
<!--
###################################################
##USRP2 Source
+## Note: the center freq must be set after the lo offset
###################################################
-->
<block>
@@ -16,14 +17,16 @@ usrp2.source_$(type.fcn)($interface)
usrp2.source_$(type.fcn)($interface, $mac_addr)
#end if
self.$(id).set_decim($decimation)
-self.$(id).set_center_freq($frequency)
-self.$(id).set_gain($gain)
#if $lo_offset() != float('inf')
self.$(id).set_lo_offset($lo_offset)
-#end if</make>
- <callback>set_lo_offset($lo_offset)</callback>
+#end if
+self.$(id).set_center_freq($frequency)
+self.$(id).set_gain($gain)</make>
<callback>set_decim($decimation)</callback>
- <callback>set_center_freq($frequency)</callback>
+ <callback>#if $lo_offset() != float('inf')
+self.$(id).set_lo_offset($lo_offset)
+#end if
+self.$(id).set_center_freq($frequency)</callback>
<callback>set_gain($gain)</callback>
<param>
<name>Output Type</name>
diff --git a/grc/blocks/usrp_dual_sink_x.xml b/grc/blocks/usrp_dual_sink_x.xml
index 8f418becd..4539b62f9 100644
--- a/grc/blocks/usrp_dual_sink_x.xml
+++ b/grc/blocks/usrp_dual_sink_x.xml
@@ -10,16 +10,18 @@
<import>from grc_gnuradio import usrp as grc_usrp</import>
<make>grc_usrp.dual_sink_$(type.fcn)(which=$which)
self.$(id).set_interp_rate($interpolation)
-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)
+self.$(id).set_frequency_a($frequency_a, verbose=True#slurp
#if $lo_offset_a() != float('inf')
-self.$(id).set_lo_offset_a($lo_offset_a)
+, lo_offset=$lo_offset_a#slurp
#end if
+)
+self.$(id).set_frequency_b($frequency_b, verbose=True#slurp
#if $lo_offset_b() != float('inf')
-self.$(id).set_lo_offset_b($lo_offset_b)
+, lo_offset=$lo_offset_b#slurp
#end if
+)
+self.$(id).set_gain_a($gain_a)
+self.$(id).set_gain_b($gain_b)
##################################################
## Flex RF A
##################################################
@@ -39,8 +41,16 @@ self.$(id).set_enable_b(True)
self.$(id).set_auto_tr_b(True)
#end if</make>
<callback>set_interp_rate($interpolation)</callback>
- <callback>set_frequency_a($frequency_a)</callback>
- <callback>set_frequency_b($frequency_b)</callback>
+ <callback>set_frequency_a($frequency_a#slurp
+#if $lo_offset_a() != float('inf')
+, lo_offset=$lo_offset_a#slurp
+#end if
+)</callback>
+ <callback>set_frequency_b($frequency_b#slurp
+#if $lo_offset_b() != float('inf')
+, lo_offset=$lo_offset_b#slurp
+#end if
+)</callback>
<callback>set_gain_a($gain_a)</callback>
<callback>set_gain_b($gain_b)</callback>
<param>
diff --git a/grc/blocks/usrp_dual_source_x.xml b/grc/blocks/usrp_dual_source_x.xml
index 740895d42..ad9a860ac 100644
--- a/grc/blocks/usrp_dual_source_x.xml
+++ b/grc/blocks/usrp_dual_source_x.xml
@@ -13,19 +13,29 @@
self.$(id).set_format(width=$format.width, shift=$format.shift)
#end if
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)
+self.$(id).set_frequency_a($frequency_a, verbose=True#slurp
#if $lo_offset_a() != float('inf')
-self.$(id).set_lo_offset_a($lo_offset_a)
+, lo_offset=$lo_offset_a#slurp
#end if
+)
+self.$(id).set_frequency_b($frequency_b, verbose=True#slurp
#if $lo_offset_b() != float('inf')
-self.$(id).set_lo_offset_b($lo_offset_b)
-#end if</make>
+, lo_offset=$lo_offset_b#slurp
+#end if
+)
+self.$(id).set_gain_a($gain_a)
+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>
+ <callback>set_frequency_a($frequency_a#slurp
+#if $lo_offset_a() != float('inf')
+, lo_offset=$lo_offset_a#slurp
+#end if
+)</callback>
+ <callback>set_frequency_b($frequency_b#slurp
+#if $lo_offset_b() != float('inf')
+, lo_offset=$lo_offset_b#slurp
+#end if
+)</callback>
<callback>set_gain_a($gain_a)</callback>
<callback>set_gain_b($gain_b)</callback>
<param>
diff --git a/grc/blocks/usrp_simple_sink_x.xml b/grc/blocks/usrp_simple_sink_x.xml
index f3ccf1263..b52cd4880 100644
--- a/grc/blocks/usrp_simple_sink_x.xml
+++ b/grc/blocks/usrp_simple_sink_x.xml
@@ -10,20 +10,24 @@
<import>from grc_gnuradio import usrp as grc_usrp</import>
<make>grc_usrp.simple_sink_$(type.fcn)(which=$which, side=$side)
self.$(id).set_interp_rate($interpolation)
-self.$(id).set_frequency($frequency, verbose=True)
+self.$(id).set_frequency($frequency, verbose=True#slurp
+#if $lo_offset() != float('inf')
+, lo_offset=$lo_offset#slurp
+#end if
+)
self.$(id).set_gain($gain)
#if $transmit.tx_enb
self.$(id).set_enable(True)
#end if
#if $transmit.auto_tr
self.$(id).set_auto_tr(True)
-#end if
-#if $lo_offset() != float('inf')
-self.$(id).set_lo_offset($lo_offset)
#end if</make>
- <callback>set_lo_offset($lo_offset)</callback>
<callback>set_interp_rate($interpolation)</callback>
- <callback>set_frequency($frequency)</callback>
+ <callback>set_frequency($frequency#slurp
+#if $lo_offset() != float('inf')
+, lo_offset=$lo_offset#slurp
+#end if
+)</callback>
<callback>set_gain($gain)</callback>
<param>
<name>Input Type</name>
diff --git a/grc/blocks/usrp_simple_source_x.xml b/grc/blocks/usrp_simple_source_x.xml
index 1a777bd63..7fcc7a22c 100644
--- a/grc/blocks/usrp_simple_source_x.xml
+++ b/grc/blocks/usrp_simple_source_x.xml
@@ -13,14 +13,18 @@
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)
+self.$(id).set_frequency($frequency, verbose=True#slurp
#if $lo_offset() != float('inf')
-self.$(id).set_lo_offset($lo_offset)
-#end if</make>
- <callback>set_lo_offset($lo_offset)</callback>
+, lo_offset=$lo_offset#slurp
+#end if
+)
+self.$(id).set_gain($gain)</make>
<callback>set_decim_rate($decimation)</callback>
- <callback>set_frequency($frequency)</callback>
+ <callback>set_frequency($frequency#slurp
+#if $lo_offset() != float('inf')
+, lo_offset=$lo_offset#slurp
+#end if
+)</callback>
<callback>set_gain($gain)</callback>
<param>
<name>Output Type</name>