Turned on baseband filtering if DBS_RX
authormleech <mleech@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 5 Sep 2006 04:13:03 +0000 (04:13 +0000)
committermleech <mleech@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 5 Sep 2006 04:13:03 +0000 (04:13 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3489 221aa14e-8319-0410-a670-987f0aec2ac5

gr-radio-astronomy/src/python/usrp_psr_receiver.py

index 8a559370690fd7564f504d7325077be063305a14..a14f59864e88f24c7a719ed9499da05d288f3a81 100755 (executable)
@@ -30,6 +30,7 @@
 #
 #
 from gnuradio import gr, gru, blks, audio
+import usrp_dbid
 from gnuradio import usrp, optfir
 from gnuradio import eng_notation
 from gnuradio.eng_option import eng_option
@@ -222,6 +223,7 @@ class app_flow_graph(stdgui.gui_flow_graph):
 
         # determine the daughterboard subdevice we're using
         self.subdev = usrp.selected_subdev(self.u, options.rx_subdev_spec)
+        self.cardtype = self.u.daughterboard_id(0)
 
         # Compute raw input rate
         input_rate = self.u.adc_freq() / self.u.decim_rate()
@@ -229,6 +231,12 @@ class app_flow_graph(stdgui.gui_flow_graph):
         # BW==input_rate for complex data
         self.bw = input_rate
 
+        #
+        # Set baseband filter bandwidth if DBS_RX:
+        #
+        if self.cardtype == usrp_dbid.DBS_RX:
+            self.subdev.set_bw((self.u.adc_freq() / self.u.decim_rate())/2)
+
         #
         # We use this as a crude volume control for the audio output
         #