commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10876 - in gnuradio/branches/developers/jblum/grc/grc


From: jblum
Subject: [Commit-gnuradio] r10876 - in gnuradio/branches/developers/jblum/grc/grc: data/platforms/python/blocks examples/usrp src/platforms/base src/platforms/gui src/platforms/python
Date: Fri, 17 Apr 2009 20:14:31 -0600 (MDT)

Author: jblum
Date: 2009-04-17 20:14:30 -0600 (Fri, 17 Apr 2009)
New Revision: 10876

Modified:
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_sink.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_source.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_noise_source_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_sig_source_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/parameter.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_chooser.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_slider.xml
   
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_text_box.xml
   
gnuradio/branches/developers/jblum/grc/grc/examples/usrp/usrp_two_tone_loopback.grc
   
gnuradio/branches/developers/jblum/grc/grc/examples/usrp/usrp_wbfm_receive.grc
   gnuradio/branches/developers/jblum/grc/grc/src/platforms/base/Param.py
   gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/Param.py
   
gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/Constants.py.in
   gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/FlowGraph.py
   gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/Param.py
Log:
 * Removed enum_raw type, now any parameter with options specified will get the 
enum/entry input.
Given the treatment: audio source/sink sampling rate, usrp simple and dual 
blocks
(now side and antenna can be specified by variables and hence command line).
 * Hide labels when blank in variables and param block.
 * Updated usrp examples, using the param block for side and antennas.
 * Fixed a bug in pre-evaluating param and var blocks.



Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_sink.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_sink.xml
      2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_sink.xml
      2009-04-18 02:14:30 UTC (rev 10876)
@@ -13,7 +13,7 @@
                <name>Sample Rate</name>
                <key>samp_rate</key>
                <value>32000</value>
-               <type>enum</type>
+               <type>int</type>
                <option>
                        <name>16KHz</name>
                        <key>16000</key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_source.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_source.xml
    2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/audio_source.xml
    2009-04-18 02:14:30 UTC (rev 10876)
@@ -13,7 +13,7 @@
                <name>Sample Rate</name>
                <key>samp_rate</key>
                <value>32000</value>
-               <type>enum</type>
+               <type>int</type>
                <option>
                        <name>16KHz</name>
                        <key>16000</key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_noise_source_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_noise_source_x.xml
       2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_noise_source_x.xml
       2009-04-18 02:14:30 UTC (rev 10876)
@@ -40,7 +40,7 @@
                <name>Noise Type</name>
                <key>noise_type</key>
                <value>gr.GR_GAUSSIAN</value>
-               <type>raw_enum</type>
+               <type>raw</type>
                <option>
                        <name>Uniform</name>
                        <key>gr.GR_UNIFORM</key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_sig_source_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_sig_source_x.xml
 2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/gr_sig_source_x.xml
 2009-04-18 02:14:30 UTC (rev 10876)
@@ -53,7 +53,7 @@
                <name>Waveform</name>
                <key>waveform</key>
                <value>gr.GR_COS_WAVE</value>
-               <type>raw_enum</type>
+               <type>raw</type>
                <option>
                        <name>Constant</name>
                        <key>gr.GR_CONST_WAVE</key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/parameter.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/parameter.xml
       2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/parameter.xml
       2009-04-18 02:14:30 UTC (rev 10876)
@@ -13,6 +13,7 @@
                <key>label</key>
                <value></value>
                <type>string</type>
+               <hide>#if $label() then 'none' else 'part'#</hide>
        </param>
        <param>
                <name>Value</name>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
      2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
      2009-04-18 02:14:30 UTC (rev 10876)
@@ -8,7 +8,7 @@
        <name>USRP Dual Source</name>
        <key>usrp_dual_source_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
-       <make>grc_usrp.dual_source_$(type.fcn)(which=$which, 
rx_ant_a='$rx_ant_a', rx_ant_b='$rx_ant_b')
+       <make>grc_usrp.dual_source_$(type.fcn)(which=$which, 
rx_ant_a=$rx_ant_a, rx_ant_b=$rx_ant_b)
 #if $format()
 self.$(id).set_format(width=$format.width, shift=$format.shift)
 #end if
@@ -95,7 +95,8 @@
        <param>
                <name>RX Antenna A</name>
                <key>rx_ant_a</key>
-               <type>enum</type>
+               <value>RXA</value>
+               <type>string</type>
                <option>
                        <name>RXA</name>
                        <key>RXA</key>
@@ -125,7 +126,8 @@
        <param>
                <name>RX Antenna B</name>
                <key>rx_ant_b</key>
-               <type>enum</type>
+               <value>RXA</value>
+               <type>string</type>
                <option>
                        <name>RXA</name>
                        <key>RXA</key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
      2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
      2009-04-18 02:14:30 UTC (rev 10876)
@@ -8,7 +8,7 @@
        <name>USRP Sink</name>
        <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')
+       <make>grc_usrp.simple_sink_$(type.fcn)(which=$which, side=$side)
 #if $format()
 self.$(id).set_format(width=$format.width, shift=$format.shift)
 #end if
@@ -83,13 +83,13 @@
                <name>Side</name>
                <key>side</key>
                <value>A</value>
-               <type>enum</type>
+               <type>string</type>
                <option>
-                       <name>Side A</name>
+                       <name>A</name>
                        <key>A</key>
                </option>
                <option>
-                       <name>Side B</name>
+                       <name>B</name>
                        <key>B</key>
                </option>
        </param>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
    2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
    2009-04-18 02:14:30 UTC (rev 10876)
@@ -8,7 +8,7 @@
        <name>USRP Source</name>
        <key>usrp_simple_source_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
-       <make>grc_usrp.simple_source_$(type.fcn)(which=$which, side='$side', 
rx_ant='$rx_ant'#if $hb_filters() then ', no_hb=True' else ''#)
+       <make>grc_usrp.simple_source_$(type.fcn)(which=$which, side=$side, 
rx_ant=$rx_ant#if $hb_filters() then ', no_hb=True' else ''#)
 #if $format()
 self.$(id).set_format(width=$format.width, shift=$format.shift)
 #end if
@@ -77,13 +77,13 @@
                <name>Side</name>
                <key>side</key>
                <value>A</value>
-               <type>enum</type>
+               <type>string</type>
                <option>
-                       <name>Side A</name>
+                       <name>A</name>
                        <key>A</key>
                </option>
                <option>
-                       <name>Side B</name>
+                       <name>B</name>
                        <key>B</key>
                </option>
        </param>
@@ -91,7 +91,7 @@
                <name>RX Antenna</name>
                <key>rx_ant</key>
                <value>RXA</value>
-               <type>enum</type>
+               <type>string</type>
                <option>
                        <name>RXA</name>
                        <key>RXA</key>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_chooser.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_chooser.xml
        2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_chooser.xml
        2009-04-18 02:14:30 UTC (rev 10876)
@@ -39,6 +39,7 @@
                <key>label</key>
                <value></value>
                <type>string</type>
+               <hide>#if $label() then 'none' else 'part'#</hide>
        </param>
        <param>
                <name>Default Value</name>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_slider.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_slider.xml
 2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_slider.xml
 2009-04-18 02:14:30 UTC (rev 10876)
@@ -49,6 +49,7 @@
                <key>label</key>
                <value></value>
                <type>string</type>
+               <hide>#if $label() then 'none' else 'part'#</hide>
        </param>
        <param>
                <name>Default Value</name>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_text_box.xml
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_text_box.xml
       2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/data/platforms/python/blocks/variable_text_box.xml
       2009-04-18 02:14:30 UTC (rev 10876)
@@ -34,6 +34,7 @@
                <key>label</key>
                <value></value>
                <type>string</type>
+               <hide>#if $label() then 'none' else 'part'#</hide>
        </param>
        <param>
                <name>Default Value</name>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/examples/usrp/usrp_two_tone_loopback.grc
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/examples/usrp/usrp_two_tone_loopback.grc
 2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/examples/usrp/usrp_two_tone_loopback.grc
 2009-04-18 02:14:30 UTC (rev 10876)
@@ -1,43 +1,46 @@
 <?xml version='1.0' encoding='ASCII'?>
 <flow_graph>
-  <timestamp>Mon Sep  8 21:47:19 2008</timestamp>
+  <timestamp>Fri Apr 17 18:23:35 2009</timestamp>
   <block>
-    <key>options</key>
+    <key>variable</key>
     <param>
       <key>id</key>
-      <value>top_block</value>
+      <value>samp_rate</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>title</key>
-      <value>USRP Loopback - 2 Tone</value>
+      <key>value</key>
+      <value>64e6/200</value>
     </param>
     <param>
-      <key>author</key>
-      <value>Example</value>
+      <key>_coordinate</key>
+      <value>(9, 166)</value>
     </param>
     <param>
-      <key>description</key>
-      <value>Loopback test with basic rx and basic tx</value>
+      <key>_rotation</key>
+      <value>0</value>
     </param>
+  </block>
+  <block>
+    <key>variable</key>
     <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
+      <key>id</key>
+      <value>tun_freq</value>
     </param>
     <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
+      <key>_enabled</key>
+      <value>True</value>
     </param>
     <param>
-      <key>category</key>
-      <value>Custom</value>
+      <key>value</key>
+      <value>int(100e6)</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(10, 10)</value>
+      <value>(116, 166)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -45,10 +48,10 @@
     </param>
   </block>
   <block>
-    <key>usrp_simple_source_x</key>
+    <key>gr_sig_source_x</key>
     <param>
       <key>id</key>
-      <value>usrp_simple_source_x</value>
+      <value>gr_sig_source_x</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -59,40 +62,28 @@
       <value>complex</value>
     </param>
     <param>
-      <key>number</key>
-      <value>0</value>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
     </param>
     <param>
-      <key>subdev_spec</key>
-      <value>None</value>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
     </param>
     <param>
-      <key>frequency</key>
-      <value>tun_freq</value>
+      <key>freq</key>
+      <value>tone1</value>
     </param>
     <param>
-      <key>decimation</key>
-      <value>200</value>
+      <key>amp</key>
+      <value>tone_ampl</value>
     </param>
     <param>
-      <key>gain</key>
-      <value>20</value>
+      <key>offset</key>
+      <value>0</value>
     </param>
     <param>
-      <key>mux</key>
-      <value>0x0</value>
-    </param>
-    <param>
-      <key>auto_tr</key>
-      <value>None</value>
-    </param>
-    <param>
-      <key>rx_ant</key>
-      <value>None</value>
-    </param>
-    <param>
       <key>_coordinate</key>
-      <value>(578, 319)</value>
+      <value>(258, 20)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -100,10 +91,10 @@
     </param>
   </block>
   <block>
-    <key>wxgui_fftsink2</key>
+    <key>gr_sig_source_x</key>
     <param>
       <key>id</key>
-      <value>wxgui_fftsink2</value>
+      <value>gr_sig_source_x0</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -114,56 +105,59 @@
       <value>complex</value>
     </param>
     <param>
-      <key>title</key>
-      <value>FFT Plot</value>
-    </param>
-    <param>
       <key>samp_rate</key>
       <value>samp_rate</value>
     </param>
     <param>
-      <key>baseband_freq</key>
-      <value>0</value>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
     </param>
     <param>
-      <key>y_per_div</key>
-      <value>10</value>
+      <key>freq</key>
+      <value>tone2</value>
     </param>
     <param>
-      <key>y_divs</key>
-      <value>8</value>
+      <key>amp</key>
+      <value>tone_ampl</value>
     </param>
     <param>
-      <key>ref_level</key>
-      <value>100</value>
+      <key>offset</key>
+      <value>0</value>
     </param>
     <param>
-      <key>fft_size</key>
-      <value>512*2</value>
+      <key>_coordinate</key>
+      <value>(255, 179)</value>
     </param>
     <param>
-      <key>fft_rate</key>
-      <value>15</value>
+      <key>_rotation</key>
+      <value>0</value>
     </param>
+  </block>
+  <block>
+    <key>gr_add_xx</key>
     <param>
-      <key>avg_alpha</key>
-      <value>0</value>
+      <key>id</key>
+      <value>gr_add_xx</value>
     </param>
     <param>
-      <key>average</key>
-      <value>False</value>
+      <key>_enabled</key>
+      <value>True</value>
     </param>
     <param>
-      <key>peak_hold</key>
-      <value>False</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>grid_pos</key>
-      <value>1, 2, 2, 4</value>
+      <key>num_inputs</key>
+      <value>3</value>
     </param>
     <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(845, 228)</value>
+      <value>(528, 78)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -171,10 +165,10 @@
     </param>
   </block>
   <block>
-    <key>variable_slider</key>
+    <key>parameter</key>
     <param>
       <key>id</key>
-      <value>tone2</value>
+      <value>tx_side</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -182,35 +176,19 @@
     </param>
     <param>
       <key>label</key>
-      <value>Tone 2</value>
+      <value></value>
     </param>
     <param>
       <key>value</key>
-      <value>75e3</value>
+      <value>A</value>
     </param>
     <param>
-      <key>min</key>
-      <value>0</value>
+      <key>type</key>
+      <value>string</value>
     </param>
     <param>
-      <key>max</key>
-      <value>150000</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 4, 1, 2</value>
-    </param>
-    <param>
       <key>_coordinate</key>
-      <value>(397, 478)</value>
+      <value>(688, 384)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -218,46 +196,50 @@
     </param>
   </block>
   <block>
-    <key>variable_slider</key>
+    <key>usrp_simple_sink_x</key>
     <param>
       <key>id</key>
-      <value>tone1</value>
+      <value>usrp_simple_sink_x</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>label</key>
-      <value>Tone 1</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>value</key>
-      <value>50e3</value>
+      <key>format</key>
+      <value></value>
     </param>
     <param>
-      <key>min</key>
+      <key>which</key>
       <value>0</value>
     </param>
     <param>
-      <key>max</key>
-      <value>150000</value>
+      <key>interpolation</key>
+      <value>400</value>
     </param>
     <param>
-      <key>num_steps</key>
-      <value>100</value>
+      <key>frequency</key>
+      <value>tun_freq</value>
     </param>
     <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
+      <key>gain</key>
+      <value>0</value>
     </param>
     <param>
-      <key>grid_pos</key>
-      <value>0, 2, 1, 2</value>
+      <key>side</key>
+      <value>tx_side</value>
     </param>
     <param>
+      <key>transmit</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(220, 475)</value>
+      <value>(835, 5)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -265,46 +247,54 @@
     </param>
   </block>
   <block>
-    <key>variable_slider</key>
+    <key>usrp_simple_source_x</key>
     <param>
       <key>id</key>
-      <value>noise_ampl</value>
+      <value>usrp_simple_source_x</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>label</key>
-      <value>Noise Ampl</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>value</key>
-      <value>2000</value>
+      <key>format</key>
+      <value></value>
     </param>
     <param>
-      <key>min</key>
+      <key>which</key>
       <value>0</value>
     </param>
     <param>
-      <key>max</key>
-      <value>5000</value>
+      <key>decimation</key>
+      <value>200</value>
     </param>
     <param>
-      <key>num_steps</key>
-      <value>100</value>
+      <key>frequency</key>
+      <value>tun_freq</value>
     </param>
     <param>
-      <key>slider_type</key>
-      <value>vertical</value>
+      <key>gain</key>
+      <value>20</value>
     </param>
     <param>
-      <key>grid_pos</key>
-      <value>1, 1, 2, 1</value>
+      <key>side</key>
+      <value>rx_side</value>
     </param>
     <param>
+      <key>rx_ant</key>
+      <value>rx_ant</value>
+    </param>
+    <param>
+      <key>hb_filters</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(20, 243)</value>
+      <value>(479, 224)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -312,22 +302,30 @@
     </param>
   </block>
   <block>
-    <key>variable</key>
+    <key>parameter</key>
     <param>
       <key>id</key>
-      <value>samp_rate</value>
+      <value>rx_ant</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
+      <key>label</key>
+      <value></value>
+    </param>
+    <param>
       <key>value</key>
-      <value>64e6/200</value>
+      <value>RXA</value>
     </param>
     <param>
+      <key>type</key>
+      <value>string</value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(9, 166)</value>
+      <value>(802, 384)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -335,65 +333,66 @@
     </param>
   </block>
   <block>
-    <key>variable</key>
+    <key>wxgui_fftsink2</key>
     <param>
       <key>id</key>
-      <value>tun_freq</value>
+      <value>wxgui_fftsink2</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>value</key>
-      <value>int(100e6)</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(116, 166)</value>
+      <key>title</key>
+      <value>FFT Plot</value>
     </param>
     <param>
-      <key>_rotation</key>
-      <value>0</value>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
     </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
     <param>
-      <key>id</key>
-      <value>gr_sig_source_x</value>
+      <key>baseband_freq</key>
+      <value>0</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>y_per_div</key>
+      <value>10</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>ref_level</key>
+      <value>100</value>
     </param>
     <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
+      <key>fft_size</key>
+      <value>512*2</value>
     </param>
     <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
+      <key>fft_rate</key>
+      <value>15</value>
     </param>
     <param>
-      <key>freq</key>
-      <value>tone1</value>
+      <key>peak_hold</key>
+      <value>False</value>
     </param>
     <param>
-      <key>amp</key>
-      <value>tone_ampl</value>
+      <key>average</key>
+      <value>False</value>
     </param>
     <param>
-      <key>offset</key>
+      <key>avg_alpha</key>
       <value>0</value>
     </param>
     <param>
+      <key>grid_pos</key>
+      <value>1, 2, 2, 4</value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(258, 20)</value>
+      <value>(746, 133)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -401,42 +400,30 @@
     </param>
   </block>
   <block>
-    <key>gr_sig_source_x</key>
+    <key>parameter</key>
     <param>
       <key>id</key>
-      <value>gr_sig_source_x0</value>
+      <value>rx_side</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>label</key>
+      <value></value>
     </param>
     <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
+      <key>value</key>
+      <value>A</value>
     </param>
     <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
+      <key>type</key>
+      <value>string</value>
     </param>
     <param>
-      <key>freq</key>
-      <value>tone2</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>tone_ampl</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>0</value>
-    </param>
-    <param>
       <key>_coordinate</key>
-      <value>(255, 179)</value>
+      <value>(568, 382)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -471,7 +458,7 @@
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(257, 337)</value>
+      <value>(276, 312)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -479,30 +466,50 @@
     </param>
   </block>
   <block>
-    <key>gr_add_xx</key>
+    <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>gr_add_xx</value>
+      <value>noise_ampl</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>label</key>
+      <value>Noise Ampl</value>
     </param>
     <param>
-      <key>num_inputs</key>
-      <value>3</value>
+      <key>value</key>
+      <value>2000</value>
     </param>
     <param>
-      <key>vlen</key>
-      <value>1</value>
+      <key>min</key>
+      <value>0</value>
     </param>
     <param>
+      <key>max</key>
+      <value>5000</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_VERTICAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 1, 2, 1</value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(528, 78)</value>
+      <value>(20, 243)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -510,54 +517,101 @@
     </param>
   </block>
   <block>
-    <key>usrp_simple_sink_x</key>
+    <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>usrp_simple_sink_x</value>
+      <value>tone_ampl</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>label</key>
+      <value>Tone Ampl</value>
     </param>
     <param>
-      <key>number</key>
+      <key>value</key>
+      <value>5000</value>
+    </param>
+    <param>
+      <key>min</key>
       <value>0</value>
     </param>
     <param>
-      <key>subdev_spec</key>
-      <value>None</value>
+      <key>max</key>
+      <value>10e3</value>
     </param>
     <param>
-      <key>frequency</key>
-      <value>tun_freq</value>
+      <key>num_steps</key>
+      <value>100</value>
     </param>
     <param>
-      <key>interpolation</key>
-      <value>400</value>
+      <key>style</key>
+      <value>wx.SL_VERTICAL</value>
     </param>
     <param>
-      <key>gain</key>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 2, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(28, 437)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
       <value>0</value>
     </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
     <param>
-      <key>mux</key>
-      <value>0x0</value>
+      <key>id</key>
+      <value>tone1</value>
     </param>
     <param>
-      <key>auto_tr</key>
-      <value>None</value>
+      <key>_enabled</key>
+      <value>True</value>
     </param>
     <param>
-      <key>tx_enb</key>
-      <value>None</value>
+      <key>label</key>
+      <value>Tone 1</value>
     </param>
     <param>
+      <key>value</key>
+      <value>50e3</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-samp_rate/2</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>samp_rate/2</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 4</value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(835, 5)</value>
+      <value>(190, 436)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -568,7 +622,7 @@
     <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>tone_ampl</value>
+      <value>tone2</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -576,11 +630,11 @@
     </param>
     <param>
       <key>label</key>
-      <value>Tone Ampl</value>
+      <value>Tone 2</value>
     </param>
     <param>
       <key>value</key>
-      <value>5000</value>
+      <value>75e3</value>
     </param>
     <param>
       <key>min</key>
@@ -595,22 +649,73 @@
       <value>100</value>
     </param>
     <param>
-      <key>slider_type</key>
-      <value>vertical</value>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
     </param>
     <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
       <key>grid_pos</key>
-      <value>1, 0, 2, 1</value>
+      <value>0, 4, 1, 4</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(21, 422)</value>
+      <value>(367, 439)</value>
     </param>
     <param>
       <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>usrp_two_tone_loopback</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP Loopback - 2 Tone</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>Loopback test with basic rx and basic tx</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
   <connection>
     <source_block_id>gr_sig_source_x</source_block_id>
     <sink_block_id>gr_add_xx</sink_block_id>

Modified: 
gnuradio/branches/developers/jblum/grc/grc/examples/usrp/usrp_wbfm_receive.grc
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/examples/usrp/usrp_wbfm_receive.grc  
    2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/examples/usrp/usrp_wbfm_receive.grc  
    2009-04-18 02:14:30 UTC (rev 10876)
@@ -1,11 +1,11 @@
 <?xml version='1.0' encoding='ASCII'?>
 <flow_graph>
-  <timestamp>Thu Jul 24 14:27:45 2008</timestamp>
+  <timestamp>Fri Apr 17 19:06:07 2009</timestamp>
   <block>
     <key>options</key>
     <param>
       <key>id</key>
-      <value>top_block</value>
+      <value>usrp_wbfm_receive</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -36,6 +36,10 @@
       <value>Custom</value>
     </param>
     <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(10, 10)</value>
     </param>
@@ -45,54 +49,22 @@
     </param>
   </block>
   <block>
-    <key>usrp_simple_source_x</key>
+    <key>variable</key>
     <param>
       <key>id</key>
-      <value>usrp_simple_source_x</value>
+      <value>decim</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>value</key>
+      <value>200</value>
     </param>
     <param>
-      <key>number</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>subdev_spec</key>
-      <value>None</value>
-    </param>
-    <param>
-      <key>frequency</key>
-      <value>(freq+fine)*1e6</value>
-    </param>
-    <param>
-      <key>decimation</key>
-      <value>decim</value>
-    </param>
-    <param>
-      <key>gain</key>
-      <value>20</value>
-    </param>
-    <param>
-      <key>mux</key>
-      <value>0x0</value>
-    </param>
-    <param>
-      <key>auto_tr</key>
-      <value>None</value>
-    </param>
-    <param>
-      <key>rx_ant</key>
-      <value>None</value>
-    </param>
-    <param>
       <key>_coordinate</key>
-      <value>(277, 29)</value>
+      <value>(14, 173)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -103,7 +75,7 @@
     <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>fine</value>
+      <value>volume</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -111,35 +83,39 @@
     </param>
     <param>
       <key>label</key>
-      <value>Fine Freq</value>
+      <value>Volume</value>
     </param>
     <param>
       <key>value</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>min</key>
-      <value>-.1</value>
+      <value>0</value>
     </param>
     <param>
       <key>max</key>
-      <value>.1</value>
+      <value>10</value>
     </param>
     <param>
       <key>num_steps</key>
       <value>100</value>
     </param>
     <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
     </param>
     <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
       <key>grid_pos</key>
-      <value>0, 2, 1, 2</value>
+      <value>1, 0, 1, 4</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(275, 246)</value>
+      <value>(991, 40)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -147,95 +123,57 @@
     </param>
   </block>
   <block>
-    <key>blks2_wfm_rcv</key>
+    <key>usrp_simple_source_x</key>
     <param>
       <key>id</key>
-      <value>blks2_wfm_rcv</value>
+      <value>usrp_simple_source_x</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>quad_rate</key>
-      <value>64e6/decim</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>audio_decimation</key>
-      <value>10</value>
+      <key>format</key>
+      <value></value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(510, 37)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
+      <key>which</key>
       <value>0</value>
     </param>
-  </block>
-  <block>
-    <key>audio_sink</key>
     <param>
-      <key>id</key>
-      <value>audio_sink</value>
+      <key>decimation</key>
+      <value>decim</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>frequency</key>
+      <value>(freq+fine)*1e6</value>
     </param>
     <param>
-      <key>samp_rate</key>
-      <value>32000</value>
+      <key>gain</key>
+      <value>20</value>
     </param>
     <param>
-      <key>device_name</key>
-      <value/>
+      <key>side</key>
+      <value>A</value>
     </param>
     <param>
-      <key>ok_to_block</key>
-      <value>True</value>
+      <key>rx_ant</key>
+      <value>None</value>
     </param>
     <param>
-      <key>num_inputs</key>
-      <value>1</value>
+      <key>hb_filters</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(703, 241)</value>
+      <value>(277, 29)</value>
     </param>
     <param>
       <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_const_vxx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_const_vxx</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>const</key>
-      <value>volume</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(764, 55)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -263,17 +201,13 @@
     </param>
     <param>
       <key>baseband_freq</key>
-      <value>0</value>
+      <value>(freq+fine)*1e6</value>
     </param>
     <param>
       <key>y_per_div</key>
       <value>10</value>
     </param>
     <param>
-      <key>y_divs</key>
-      <value>8</value>
-    </param>
-    <param>
       <key>ref_level</key>
       <value>50</value>
     </param>
@@ -286,16 +220,16 @@
       <value>15</value>
     </param>
     <param>
-      <key>avg_alpha</key>
-      <value>0</value>
+      <key>peak_hold</key>
+      <value>False</value>
     </param>
     <param>
       <key>average</key>
       <value>False</value>
     </param>
     <param>
-      <key>peak_hold</key>
-      <value>False</value>
+      <key>avg_alpha</key>
+      <value>0</value>
     </param>
     <param>
       <key>grid_pos</key>
@@ -314,7 +248,7 @@
     <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>volume</value>
+      <value>freq</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -322,35 +256,39 @@
     </param>
     <param>
       <key>label</key>
-      <value>Volume</value>
+      <value>Frequency (MHz)</value>
     </param>
     <param>
       <key>value</key>
-      <value>1</value>
+      <value>100</value>
     </param>
     <param>
       <key>min</key>
-      <value>0</value>
+      <value>87.5</value>
     </param>
     <param>
       <key>max</key>
-      <value>10</value>
+      <value>108.0</value>
     </param>
     <param>
       <key>num_steps</key>
-      <value>100</value>
+      <value>1000</value>
     </param>
     <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
     </param>
     <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
       <key>grid_pos</key>
-      <value>1, 1, 1, 2</value>
+      <value>0, 0, 1, 2</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(991, 40)</value>
+      <value>(104, 243)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -361,7 +299,7 @@
     <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>freq</value>
+      <value>fine</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -369,35 +307,39 @@
     </param>
     <param>
       <key>label</key>
-      <value>Frequency</value>
+      <value>Fine Freq (MHz)</value>
     </param>
     <param>
       <key>value</key>
-      <value>100</value>
+      <value>0</value>
     </param>
     <param>
       <key>min</key>
-      <value>87.5</value>
+      <value>-.1</value>
     </param>
     <param>
       <key>max</key>
-      <value>108.0</value>
+      <value>.1</value>
     </param>
     <param>
       <key>num_steps</key>
-      <value>1000</value>
+      <value>100</value>
     </param>
     <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
     </param>
     <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
       <key>grid_pos</key>
-      <value>0, 0, 1, 2</value>
+      <value>0, 2, 1, 2</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(104, 243)</value>
+      <value>(275, 246)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -405,28 +347,98 @@
     </param>
   </block>
   <block>
-    <key>variable</key>
+    <key>blks2_wfm_rcv</key>
     <param>
       <key>id</key>
-      <value>decim</value>
+      <value>blks2_wfm_rcv</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>value</key>
-      <value>200</value>
+      <key>quad_rate</key>
+      <value>64e6/decim</value>
     </param>
     <param>
+      <key>audio_decimation</key>
+      <value>10</value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(14, 173)</value>
+      <value>(510, 37)</value>
     </param>
     <param>
       <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>volume</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(764, 55)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>audio_sink</key>
+    <param>
+      <key>id</key>
+      <value>audio_sink</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>device_name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>ok_to_block</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(703, 241)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
   <connection>
     <source_block_id>usrp_simple_source_x</source_block_id>
     <sink_block_id>blks2_wfm_rcv</sink_block_id>
@@ -451,4 +463,4 @@
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
-</flow_graph>
\ No newline at end of file
+</flow_graph>

Modified: gnuradio/branches/developers/jblum/grc/grc/src/platforms/base/Param.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/platforms/base/Param.py      
2009-04-17 23:30:58 UTC (rev 10875)
+++ gnuradio/branches/developers/jblum/grc/grc/src/platforms/base/Param.py      
2009-04-18 02:14:30 UTC (rev 10876)
@@ -22,7 +22,6 @@
 import pygtk
 pygtk.require('2.0')
 import gtk
-import gobject
 
 class InputParam(gtk.HBox):
        """The base class for an input parameter inside the input parameters 
dialog."""
@@ -66,6 +65,29 @@
                self.pack_start(self._input, False)
        def get_text(self): return 
self.param.get_option_keys()[self._input.get_active()]
 
+class EnumEntryParam(InputParam):
+       """Provide an entry box and drop down menu for Raw Enum types."""
+
+       def __init__(self, *args, **kwargs):
+               InputParam.__init__(self, *args, **kwargs)
+               self._input = gtk.combo_box_entry_new_text()
+               for option in self.param.get_options(): 
self._input.append_text(option.get_name())
+               try: 
self._input.set_active(self.param.get_option_keys().index(self.param.get_value()))
+               except:
+                       self._input.set_active(-1)
+                       self._input.get_child().set_text(self.param.get_value())
+               self._input.connect('changed', self._handle_changed)
+               self._input.get_child().connect('changed', self._handle_changed)
+               self.pack_start(self._input, False)
+       def get_text(self):
+               if self._input.get_active() == -1: return 
self._input.get_child().get_text()
+               return self.param.get_option_keys()[self._input.get_active()]
+       def set_color(self, color):
+               if self._input.get_active() == -1: #custom entry, use color
+                       self._input.get_child().modify_base(gtk.STATE_NORMAL, 
gtk.gdk.color_parse(color))
+               else: #from enum, make white background
+                       self._input.get_child().modify_base(gtk.STATE_NORMAL, 
gtk.gdk.color_parse('#ffffff'))
+
 class Option(Element):
 
        def __init__(self, param, n):
@@ -73,12 +95,17 @@
                self._name = n.find('name')
                self._key = n.find('key')
                self._opts = dict()
-               for opt in n.findall('opt'):
+               opts = n.findall('opt')
+               #test against opts when non enum
+               try: assert self.get_parent().is_enum() or not opts
+               except AssertionError: self._exit_with_error('Options for 
non-enum types cannot have sub-options')
+               #extract opts
+               for opt in opts:
                        #separate the key:value
                        try: key, value = opt.split(':')
                        except: self._exit_with_error('Error separating "%s" 
into key:value'%opt)
                        #test against repeated keys
-                       try: assert(not self._opts.has_key(key))
+                       try: assert not self._opts.has_key(key)
                        except AssertionError: self._exit_with_error('Key "%s" 
already exists in option'%key)
                        #store the option
                        self._opts[key] = value
@@ -207,9 +234,13 @@
        def get_input_class(self):
                """
                Get the graphical gtk class to represent this parameter.
+               An enum requires and combo parameter.
+               A non-enum with options gets a combined entry/combo parameter.
+               All others get a standard entry parameter.
                @return gtk input class
                """
                if self.is_enum(): return EnumParam
+               if self.get_options(): return EnumEntryParam
                return EntryParam
 
        ##############################################

Modified: gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/Param.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/Param.py       
2009-04-17 23:30:58 UTC (rev 10875)
+++ gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/Param.py       
2009-04-18 02:14:30 UTC (rev 10876)
@@ -1,5 +1,5 @@
 """
-Copyright 2007 Free Software Foundation, Inc.
+Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@
 PARAM_LABEL_MARKUP_TMPL="""\
 #set $foreground = $param.is_valid() and 'black' or 'red'
 #set $underline = $has_cb and 'low' or 'none'
-<span underline="$underline" foreground="$foreground" font_desc="Sans 
9.5"><b>$encode($param.get_name())</b></span>"""
+<span underline="$underline" foreground="$foreground" font_desc="Sans 
9">$encode($param.get_name())</span>"""
 
 TIP_MARKUP_TMPL="""\
 Key: $param.get_key()

Modified: 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/Constants.py.in
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/Constants.py.in 
    2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/Constants.py.in 
    2009-04-18 02:14:30 UTC (rev 10876)
@@ -50,3 +50,4 @@
 INT_VECTOR_COLOR_SPEC = '#00CC99'
 SHORT_VECTOR_COLOR_SPEC = '#CCCC33'
 BYTE_VECTOR_COLOR_SPEC = '#CC66CC'
+ID_COLOR_SPEC = '#DDDDDD'

Modified: 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/FlowGraph.py
===================================================================
--- 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/FlowGraph.py    
    2009-04-17 23:30:58 UTC (rev 10875)
+++ 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/FlowGraph.py    
    2009-04-18 02:14:30 UTC (rev 10876)
@@ -1,5 +1,5 @@
 """
-Copyright 2008 Free Software Foundation, Inc.
+Copyright 2008, 2009 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -22,6 +22,16 @@
 from Block import Block
 from Connection import Connection
 
+def _get_value_expr(variable_block):
+       """
+       Get the expression to evaluate from the value param.
+       @param variable_block the variable or parameter block
+       @return the expression string
+       """
+       value_param = variable_block.get_param('value')
+       value_param.evaluate() #evaluate prior to code
+       return value_param.to_code()
+
 class FlowGraph(_FlowGraph):
 
        _eval_cache = dict()
@@ -135,14 +145,14 @@
                        np = dict()
                        for parameter in self.get_parameters():
                                try:
-                                       e = 
self._eval(parameter.get_param('value').to_code(), n)
+                                       e = 
self._eval(_get_value_expr(parameter), n)
                                        np[parameter.get_id()] = e
                                except: pass
                        n.update(np) #merge param namespace
                        #load variables
                        for variable in self.get_variables():
                                try:
-                                       e = 
self._eval(variable.get_param('value').to_code(), n)
+                                       e = 
self._eval(_get_value_expr(variable), n)
                                        n[variable.get_id()] = e
                                except: pass
                        #make namespace public

Modified: 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/Param.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/Param.py    
2009-04-17 23:30:58 UTC (rev 10875)
+++ gnuradio/branches/developers/jblum/grc/grc/src/platforms/python/Param.py    
2009-04-18 02:14:30 UTC (rev 10876)
@@ -1,5 +1,5 @@
 """
-Copyright 2008 Free Software Foundation, Inc.
+Copyright 2008, 2009 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
 """
 
 from utils import expr_utils
-from .. base.Param import Param as _Param, EntryParam, InputParam
+from .. base.Param import Param as _Param, EntryParam
 import Constants
 import numpy
 import os
@@ -63,24 +63,6 @@
                        self._handle_changed()
                file_dialog.destroy() #destroy the dialog
 
-class EnumEntryParam(InputParam):
-       """Provide an entry box and drop down menu for Raw Enum types."""
-
-       def __init__(self, *args, **kwargs):
-               InputParam.__init__(self, *args, **kwargs)
-               self._input = gtk.combo_box_entry_new_text()
-               for option in self.param.get_options(): 
self._input.append_text(option.get_name())
-               try: 
self._input.set_active(self.param.get_option_keys().index(self.param.get_value()))
-               except:
-                       self._input.set_active(-1)
-                       self._input.get_child().set_text(self.param.get_value())
-               self._input.connect('changed', self._handle_changed)
-               self._input.get_child().connect('changed', self._handle_changed)
-               self.pack_start(self._input, False)
-       def get_text(self):
-               if self._input.get_active() == -1: return 
self._input.get_child().get_text()
-               return self.param.get_option_keys()[self._input.get_active()]
-
 #define types, native python + numpy
 VECTOR_TYPES = (tuple, list, set, numpy.ndarray)
 COMPLEX_TYPES = [complex, numpy.complex, numpy.complex64, numpy.complex128]
@@ -105,7 +87,6 @@
                'file_open', 'file_save',
                'id',
                'grid_pos', 'import',
-               'raw_enum',
        ]
 
        def __repr__(self):
@@ -157,7 +138,6 @@
 
        def get_input_class(self):
                if self.get_type() in ('file_open', 'file_save'): return 
FileParam
-               if self.get_type() == 'raw_enum': return EnumEntryParam
                return _Param.get_input_class(self)
 
        def get_color(self):
@@ -178,7 +158,7 @@
                                #special
                                'hex': Constants.INT_COLOR_SPEC,
                                'string': Constants.BYTE_VECTOR_COLOR_SPEC,
-                               'id': '#DDDDDD',
+                               'id': Constants.ID_COLOR_SPEC,
                                'grid_pos': Constants.INT_VECTOR_COLOR_SPEC,
                        }[self.get_type()]
                except: return _Param.get_color(self)
@@ -239,14 +219,14 @@
                #########################
                # Numeric Types
                #########################
-               elif t in ('raw_enum', 'raw', 'complex', 'real', 'int', 
'complex_vector', 'real_vector', 'int_vector', 'hex'):
+               elif t in ('raw', 'complex', 'real', 'int', 'complex_vector', 
'real_vector', 'int_vector', 'hex'):
                        #raise exception if python cannot evaluate this value
                        try: e = self.get_parent().get_parent().evaluate(v)
                        except:
                                self._add_error_message('Value "%s" cannot be 
evaluated.'%v)
                                raise Exception
                        #raise an exception if the data is invalid
-                       if t in ('raw', 'raw_enum'): return e
+                       if t == 'raw': return e
                        elif t == 'complex':
                                try: assert(isinstance(e, COMPLEX_TYPES))
                                except AssertionError:





reply via email to

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