commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10832 - in gnuradio/branches/releases/3.2: . gnuradio


From: jcorgan
Subject: [Commit-gnuradio] r10832 - in gnuradio/branches/releases/3.2: . gnuradio-core/src/python/gnuradio/gr gr-wxgui/src/python/plotter grc/data/platforms/python/blocks
Date: Tue, 14 Apr 2009 13:55:58 -0600 (MDT)

Author: jcorgan
Date: 2009-04-14 13:55:58 -0600 (Tue, 14 Apr 2009)
New Revision: 10832

Modified:
   gnuradio/branches/releases/3.2/
   gnuradio/branches/releases/3.2/gnuradio-core/src/python/gnuradio/gr/pubsub.py
   
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
   gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_add_xx.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_multiply_xx.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
Log:
Applied changesets r10714, r10778, r10787 to release 3.2 branch.


Property changes on: gnuradio/branches/releases/3.2
___________________________________________________________________
Modified: svn:mergeinfo
   - /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/eb/t378:10683-10688
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/jblum/vlen:10667-10677
/gnuradio/branches/developers/jcorgan/fw-optimize:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10562-10563,10565,10574-10576,10578-10579,10581-10582,10585,10587,10596-10600,10623-10624,10629,10632-10634,10645-10646,10649-10650,10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10715-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768
   + /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/eb/t378:10683-10688
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/jblum/vlen:10667-10677
/gnuradio/branches/developers/jcorgan/fw-optimize:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10562-10563,10565,10574-10576,10578-10579,10581-10582,10585,10587,10596-10600,10623-10624,10629,10632-10634,10645-10646,10649-10650,10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768,10778,10787


Property changes on: 
gnuradio/branches/releases/3.2/gnuradio-core/src/python/gnuradio/gr/pubsub.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/branches/developers/eb/t378/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10667-10677
/gnuradio/branches/developers/jcorgan/gpio2/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10713-10765
/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10715-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768
   + 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/branches/developers/eb/t378/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10667-10677
/gnuradio/branches/developers/jcorgan/gpio2/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10713-10765
/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768,10778,10787

Modified: 
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
===================================================================
--- 
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py 
    2009-04-14 19:51:47 UTC (rev 10831)
+++ 
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py 
    2009-04-14 19:55:58 UTC (rev 10832)
@@ -62,6 +62,7 @@
                #setup point label cache
                self._point_label_cache = 
self.new_gl_cache(self._draw_point_label, 75)
                self.enable_point_label(False)
+               self.enable_grid_aspect_ratio(False)
                self.set_point_label_coordinate(None)
                common.point_label_thread(self)
                #init grid plotter
@@ -84,6 +85,20 @@
                self.update()
                self.unlock()
 
+       def enable_grid_aspect_ratio(self, enable=None):
+               """
+               Enable/disable the grid aspect ratio.
+               If enabled, enforce the aspect ratio on the padding:
+                       horizontal_padding:vertical_padding == width:height
+               @param enable true to enable
+               @return the enable state when None
+               """
+               if enable is None: return self._enable_grid_aspect_ratio
+               self.lock()
+               self._enable_grid_aspect_ratio = enable
+               for cache in self._gl_caches: cache.changed(True)
+               self.unlock()
+
        def enable_point_label(self, enable=None):
                """
                Enable/disable the point label.
@@ -204,6 +219,23 @@
                self.padding_right = max(2*TICK_LABEL_PADDING, 
self.padding_right_min)
                self.padding_bottom = max(2*AXIS_LABEL_PADDING + 
TICK_LABEL_PADDING + x_label.get_size()[1] + max([label.get_size()[1] for tick, 
label in x_tick_labels]), self.padding_bottom_min)
                self.padding_left = max(2*AXIS_LABEL_PADDING + 
TICK_LABEL_PADDING + y_label.get_size()[1] + max([label.get_size()[0] for tick, 
label in y_tick_labels]), self.padding_left_min)
+               #enforce padding aspect ratio if enabled
+               if self.enable_grid_aspect_ratio():
+                       w_over_h_ratio = float(self.width)/float(self.height)
+                       horizontal_padding = float(self.padding_right + 
self.padding_left)
+                       veritical_padding = float(self.padding_top + 
self.padding_bottom)
+                       if w_over_h_ratio > 
horizontal_padding/veritical_padding:
+                               #increase the horizontal padding
+                               new_padding = veritical_padding*w_over_h_ratio 
- horizontal_padding
+                               #distribute the padding to left and right
+                               self.padding_left += int(round(new_padding/2))
+                               self.padding_right += int(round(new_padding/2))
+                       else:
+                               #increase the vertical padding
+                               new_padding = horizontal_padding/w_over_h_ratio 
- veritical_padding
+                               #distribute the padding to top and bottom
+                               self.padding_top += int(round(new_padding/2))
+                               self.padding_bottom += int(round(new_padding/2))
                ##################################################
                # Draw Grid X
                ##################################################


Property changes on: 
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t378/gr-wxgui/src/python/plotter/grid_plotter_base.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gr-wxgui/src/python/plotter/grid_plotter_base.py:10667-10677
/gnuradio/branches/developers/jcorgan/gpio2/gr-wxgui/src/python/plotter/grid_plotter_base.py:10713-10765
/gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py:10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10715-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768
   + 
/gnuradio/branches/developers/eb/t378/gr-wxgui/src/python/plotter/grid_plotter_base.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gr-wxgui/src/python/plotter/grid_plotter_base.py:10667-10677
/gnuradio/branches/developers/jcorgan/gpio2/gr-wxgui/src/python/plotter/grid_plotter_base.py:10713-10765
/gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py:10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768,10778,10787


Property changes on: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_add_xx.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_add_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_add_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_add_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_add_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_add_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_add_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_add_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10715-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_add_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_add_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_add_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_add_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_add_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_add_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_add_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768,10778,10787


Property changes on: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_multiply_xx.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10715-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768,10778,10787

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
        2009-04-14 19:51:47 UTC (rev 10831)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
        2009-04-14 19:55:58 UTC (rev 10832)
@@ -9,9 +9,6 @@
        <key>usrp_dual_sink_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
        <make>grc_usrp.dual_sink_$(type.fcn)(which=$which)
-#if $format.eval
-self.$(id).set_format(width=$format.width, shift=$format.shift)
-#end if
 self.$(id).set_interp_rate($interpolation)
 self.$(id).set_frequency_a($frequency_a, verbose=True)
 self.$(id).set_frequency_b($frequency_b, verbose=True)
@@ -56,25 +53,6 @@
                </option>
        </param>
        <param>
-               <name>Format</name>
-               <key>format</key>
-               <value></value>
-               <type>enum</type>
-               <hide>#if $format.eval then '' else 'part'#</hide>
-               <option>
-                       <name>16 Bits (Default)</name>
-                       <key></key>
-                       <opt>width:16</opt>
-                       <opt>shift:0</opt>
-               </option>
-               <option>
-                       <name>8 Bits, Shift 8</name>
-                       <key>w8_s8</key>
-                       <opt>width:8</opt>
-                       <opt>shift:8</opt>
-               </option>
-       </param>
-       <param>
                <name>Unit Number</name>
                <key>which</key>
                <value>0</value>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
      2009-04-14 19:51:47 UTC (rev 10831)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
      2009-04-14 19:55:58 UTC (rev 10832)
@@ -9,9 +9,6 @@
        <key>usrp_simple_sink_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
        <make>grc_usrp.simple_sink_$(type.fcn)(which=$which, side='$side')
-#if $format.eval
-self.$(id).set_format(width=$format.width, shift=$format.shift)
-#end if
 self.$(id).set_interp_rate($interpolation)
 self.$(id).set_frequency($frequency, verbose=True)
 self.$(id).set_gain($gain)
@@ -40,25 +37,6 @@
                </option>
        </param>
        <param>
-               <name>Format</name>
-               <key>format</key>
-               <value></value>
-               <type>enum</type>
-               <hide>#if $format.eval then '' else 'part'#</hide>
-               <option>
-                       <name>16 Bits (Default)</name>
-                       <key></key>
-                       <opt>width:16</opt>
-                       <opt>shift:0</opt>
-               </option>
-               <option>
-                       <name>8 Bits, Shift 8</name>
-                       <key>w8_s8</key>
-                       <opt>width:8</opt>
-                       <opt>shift:8</opt>
-               </option>
-       </param>
-       <param>
                <name>Unit Number</name>
                <key>which</key>
                <value>0</value>





reply via email to

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