Modifications to usrp2 source and sink so that set center freq is called afer set...
authorJosh Blum <josh@joshknows.com>
Wed, 2 Sep 2009 20:41:56 +0000 (13:41 -0700)
committerJosh Blum <josh@joshknows.com>
Wed, 2 Sep 2009 20:41:56 +0000 (13:41 -0700)
grc/blocks/usrp2_sink_xxxx.xml
grc/blocks/usrp2_source_xxxx.xml

index 639f96cf48bffd08bfcb4aeda0c09f46c0975fca..f2ee4d151f8b9834cc60d7a1691b1458ee8cf7c8 100644 (file)
@@ -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>
index 6c776d0ad37deaa54f32b3d7b570eb717a0caf37..02046e609a37b1f4ae2310e5362f0139e88d0db4 100644 (file)
@@ -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>