commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r11332 - gnuradio/branches/developers/trondeau/qt/gnur


From: trondeau
Subject: [Commit-gnuradio] r11332 - gnuradio/branches/developers/trondeau/qt/gnuradio-examples/python/digital
Date: Fri, 3 Jul 2009 09:01:37 -0600 (MDT)

Author: trondeau
Date: 2009-07-03 09:01:37 -0600 (Fri, 03 Jul 2009)
New Revision: 11332

Modified:
   
gnuradio/branches/developers/trondeau/qt/gnuradio-examples/python/digital/benchmark_qt_rx.py
Log:
Passing bandwidth information to gui.

Modified: 
gnuradio/branches/developers/trondeau/qt/gnuradio-examples/python/digital/benchmark_qt_rx.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/qt/gnuradio-examples/python/digital/benchmark_qt_rx.py
        2009-07-03 14:05:05 UTC (rev 11331)
+++ 
gnuradio/branches/developers/trondeau/qt/gnuradio-examples/python/digital/benchmark_qt_rx.py
        2009-07-03 15:01:37 UTC (rev 11332)
@@ -213,12 +213,13 @@
         if self.gui_on:
             self.qapp = QtGui.QApplication(sys.argv)
             fftsize = 2048
-            
+
+            bw_in = self.u.adc_rate() / self.decim()
             self.snk_rxin = qtgui.sink_c(fftsize, 
gr.firdes.WIN_BLACKMAN_hARRIS,
-                                         -1/2, 1/2,
+                                         -bw_in/2.0, bw_in/2.0,
                                          "Received", True, True, False, True, 
True, False)
             self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
-                                       -1/2, 1/2,
+                                       -self._bitrate/2.0, self._bitrate/2.0,
                                        "Post-Synchronizer", True, True, False, 
True, True, False)
 
             self.snk_rxin.set_frequency_axis(-60, 60)
@@ -285,6 +286,12 @@
         self._decim = decim
         self.u.set_decim(self._decim)
 
+        if(self.gui_on):
+            bw_in = self.u.adc_rate() / self._decim
+            self._bitrate = bw_in / self._samples_per_symbol
+            self.snk_rxin.set_frequency_range(0, -bw_in/2.0, bw_in/2.0)
+            self.snk_rx.set_frequency_range(0, -self._bitrate/2.0, 
self._bitrate/2.0)
+
     def frequency(self):
         return self._rx_freq
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]