summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
Diffstat (limited to 'grc')
-rw-r--r--grc/data/platforms/python/block_tree.xml1
-rw-r--r--grc/data/platforms/python/blocks/Makefile.am1
-rw-r--r--grc/data/platforms/python/blocks/wxgui_constellationsink2.xml90
-rw-r--r--grc/data/platforms/python/blocks/wxgui_fftsink2.xml62
-rw-r--r--grc/data/platforms/python/blocks/wxgui_histosink2.xml56
-rw-r--r--grc/data/platforms/python/blocks/wxgui_numbersink2.xml53
-rw-r--r--grc/data/platforms/python/blocks/wxgui_scopesink2.xml68
-rw-r--r--grc/examples/simple/ber_simulation.grc186
-rw-r--r--grc/examples/trellis/interference_cancellation.grc392
-rw-r--r--grc/src/grc_gnuradio/wxgui/callback_controls.py24
10 files changed, 563 insertions, 370 deletions
diff --git a/grc/data/platforms/python/block_tree.xml b/grc/data/platforms/python/block_tree.xml
index bb2d681f0..7e13aaff6 100644
--- a/grc/data/platforms/python/block_tree.xml
+++ b/grc/data/platforms/python/block_tree.xml
@@ -38,6 +38,7 @@
<block>wxgui_fftsink2</block>
<block>wxgui_constellationsink2</block>
<block>wxgui_waterfallsink2</block>
+ <block>wxgui_histosink2</block>
</cat>
<cat>
<name>Operators</name>
diff --git a/grc/data/platforms/python/blocks/Makefile.am b/grc/data/platforms/python/blocks/Makefile.am
index 6b09050f3..506648d45 100644
--- a/grc/data/platforms/python/blocks/Makefile.am
+++ b/grc/data/platforms/python/blocks/Makefile.am
@@ -210,6 +210,7 @@ dist_ourdata_DATA = \
variable_text_box.xml \
wxgui_constellationsink2.xml \
wxgui_fftsink2.xml \
+ wxgui_histosink2.xml \
wxgui_numbersink2.xml \
wxgui_scopesink2.xml \
wxgui_waterfallsink2.xml \
diff --git a/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml b/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml
index cf3f29280..69869904f 100644
--- a/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml
+++ b/grc/data/platforms/python/blocks/wxgui_constellationsink2.xml
@@ -7,14 +7,22 @@
<block>
<name>Constellation Sink</name>
<key>wxgui_constellationsink2</key>
- <import>from gnuradio.wxgui import scopesink2</import>
- <make>scopesink2.constellation_sink(
+ <import>from gnuradio.wxgui import constsink_gl</import>
+ <make>constsink_gl.const_sink_c(
self.GetWin(),
title=$title,
sample_rate=$samp_rate,
- frame_decim=$frame_decim,
+ frame_rate=$frame_rate,
+ const_size=$const_size,
+ M=$M,
+ theta=$theta,
+ alpha=$alpha,
+ fmax=$fmax,
+ mu=$mu,
+ gain_mu=$gain_mu,
+ symbol_rate=$symbol_rate,
+ omega_limit=$omega_limit,
)
-self.$(id).win.$(marker)()
#set $grid_pos = $grid_pos.eval
#if not grid_pos
self.Add(self.$(id).win)
@@ -35,28 +43,64 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos
<type>real</type>
</param>
<param>
- <name>Frame Decimation</name>
- <key>frame_decim</key>
- <value>15</value>
+ <name>Frame Rate</name>
+ <key>frame_rate</key>
+ <value>5</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Constellation Size</name>
+ <key>const_size</key>
+ <value>2048</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>M</name>
+ <key>M</key>
+ <value>4</value>
<type>int</type>
</param>
<param>
- <name>Marker</name>
- <key>marker</key>
- <value>set_format_plus</value>
- <type>enum</type>
- <option>
- <name>Line</name>
- <key>set_format_line</key>
- </option>
- <option>
- <name>Dot</name>
- <key>set_format_dot</key>
- </option>
- <option>
- <name>Plus</name>
- <key>set_format_plus</key>
- </option>
+ <name>Theta</name>
+ <key>theta</key>
+ <value>0</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Alpha</name>
+ <key>alpha</key>
+ <value>0.005</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Max Freq</name>
+ <key>fmax</key>
+ <value>0.06</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Mu</name>
+ <key>mu</key>
+ <value>0.5</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Gain Mu</name>
+ <key>gain_mu</key>
+ <value>0.005</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Symbol Rate</name>
+ <key>symbol_rate</key>
+ <value>samp_rate/4.</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Omega Limit</name>
+ <key>omega_limit</key>
+ <value>0.005</value>
+ <type>real</type>
</param>
<param>
<name>Grid Position</name>
diff --git a/grc/data/platforms/python/blocks/wxgui_fftsink2.xml b/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
index 6c6b747b3..c729bea4b 100644
--- a/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
+++ b/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
@@ -12,7 +12,6 @@
self.GetWin(),
baseband_freq=$baseband_freq,
y_per_div=$y_per_div,
- y_divs=$y_divs,
ref_level=$ref_level,
sample_rate=$samp_rate,
fft_size=$fft_size,
@@ -68,16 +67,30 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos
<name>Y per Div</name>
<key>y_per_div</key>
<value>10</value>
- <type>real</type>
- </param>
- <param>
- <name>Y Divs</name>
- <key>y_divs</key>
- <value>8</value>
- <type>real</type>
+ <type>enum</type>
+ <option>
+ <name>1 dB</name>
+ <key>1</key>
+ </option>
+ <option>
+ <name>2 dB</name>
+ <key>2</key>
+ </option>
+ <option>
+ <name>5 dB</name>
+ <key>5</key>
+ </option>
+ <option>
+ <name>10 dB</name>
+ <key>10</key>
+ </option>
+ <option>
+ <name>20 dB</name>
+ <key>20</key>
+ </option>
</param>
<param>
- <name>Reference Level</name>
+ <name>Ref Level (dB)</name>
<key>ref_level</key>
<value>50</value>
<type>real</type>
@@ -95,40 +108,43 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos
<type>int</type>
</param>
<param>
- <name>Average Alpha</name>
- <key>avg_alpha</key>
- <value>0</value>
- <type>real</type>
- </param>
- <param>
- <name>Average</name>
- <key>average</key>
+ <name>Peak Hold</name>
+ <key>peak_hold</key>
<value>False</value>
<type>enum</type>
+ <hide>#if $peak_hold.eval == 'True' then 'none' else 'part'#</hide>
<option>
- <name>Yes</name>
+ <name>On</name>
<key>True</key>
</option>
<option>
- <name>No</name>
+ <name>Off</name>
<key>False</key>
</option>
</param>
<param>
- <name>Peak Hold</name>
- <key>peak_hold</key>
+ <name>Average</name>
+ <key>average</key>
<value>False</value>
<type>enum</type>
+ <hide>#if $average.eval == 'True' then 'none' else 'part'#</hide>
<option>
- <name>Yes</name>
+ <name>On</name>
<key>True</key>
</option>
<option>
- <name>No</name>
+ <name>Off</name>
<key>False</key>
</option>
</param>
<param>
+ <name>Average Alpha</name>
+ <key>avg_alpha</key>
+ <value>0</value>
+ <type>real</type>
+ <hide>#if $average.eval == 'True' then 'none' else 'all'#</hide>
+ </param>
+ <param>
<name>Grid Position</name>
<key>grid_pos</key>
<value></value>
diff --git a/grc/data/platforms/python/blocks/wxgui_histosink2.xml b/grc/data/platforms/python/blocks/wxgui_histosink2.xml
new file mode 100644
index 000000000..3d694aedc
--- /dev/null
+++ b/grc/data/platforms/python/blocks/wxgui_histosink2.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Histogram Sink
+###################################################
+ -->
+<block>
+ <name>Histo Sink</name>
+ <key>wxgui_histosink2</key>
+ <import>from gnuradio.wxgui import histosink_gl</import>
+ <make>histosink_gl.histo_sink_f(
+ self.GetWin(),
+ title=$title,
+ num_bins=$num_bins,
+ frame_size=$frame_size,
+)
+#set $grid_pos = $grid_pos.eval
+#if not grid_pos
+self.Add(self.$(id).win)
+#else
+self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos[3])
+#end if</make>
+ <callback>set_num_bins($num_bins)</callback>
+ <callback>set_frame_size($frame_size)</callback>
+ <param>
+ <name>Title</name>
+ <key>title</key>
+ <value>Histogram Plot</value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Num Bins</name>
+ <key>num_bins</key>
+ <value>27</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Frame Size</name>
+ <key>frame_size</key>
+ <value>1000</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Grid Position</name>
+ <key>grid_pos</key>
+ <value></value>
+ <type>grid_pos</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+ <doc>
+Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
+ </doc>
+</block>
diff --git a/grc/data/platforms/python/blocks/wxgui_numbersink2.xml b/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
index 3e224228e..1b32993e1 100644
--- a/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
+++ b/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
@@ -19,10 +19,10 @@
ref_level=$ref_level,
sample_rate=$samp_rate,
number_rate=$number_rate,
- average=$options.average,
+ average=$average,
avg_alpha=#if $avg_alpha.eval then $avg_alpha else 'None'#,
label=$title,
- peak_hold=$options.peak_hold,
+ peak_hold=$peak_hold,
show_gauge=$show_gauge,
)
#set $grid_pos = $grid_pos.eval
@@ -108,34 +108,41 @@ self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos
<type>int</type>
</param>
<param>
- <name>Average Alpha</name>
- <key>avg_alpha</key>
- <value>0</value>
- <type>real</type>
- </param>
- <param>
- <name>Options</name>
- <key>options</key>
- <value>none</value>
+ <name>Peak Hold</name>
+ <key>peak_hold</key>
+ <value>False</value>
<type>enum</type>
+ <hide>#if $peak_hold.eval == 'True' then 'none' else 'part'#</hide>
<option>
- <name>None</name>
- <key>none</key>
- <opt>peak_hold:False</opt>
- <opt>average:False</opt>
+ <name>On</name>
+ <key>True</key>
</option>
<option>
- <name>Average</name>
- <key>average</key>
- <opt>peak_hold:False</opt>
- <opt>average:True</opt>
+ <name>Off</name>
+ <key>False</key>
</option>
+ </param>
+ <param>
+ <name>Average</name>
+ <key>average</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide>#if $average.eval == 'True' then 'none' else 'part'#</hide>
<option>
- <name>Peak Hold</name>
- <key>peak_hold</key>
- <opt>peak_hold:True</opt>
- <opt>average:False</opt>
+ <name>On</name>
+ <key>True</key>
</option>
+ <option>
+ <name>Off</name>
+ <key>False</key>
+ </option>
+ </param>
+ <param>
+ <name>Average Alpha</name>
+ <key>avg_alpha</key>
+ <value>0</value>
+ <type>real</type>
+ <hide>#if $average.eval == 'True' then 'none' else 'all'#</hide>
</param>
<param>
<name>Show Gauge</name>
diff --git a/grc/data/platforms/python/blocks/wxgui_scopesink2.xml b/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
index 819a8e9a9..1af0afb35 100644
--- a/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
+++ b/grc/data/platforms/python/blocks/wxgui_scopesink2.xml
@@ -13,21 +13,18 @@
self.GetWin(),
title=$title,
sample_rate=$samp_rate,
- frame_decim=$frame_decim,
- v_scale=#if $v_scale.eval then $v_scale else 'None'#,
+ v_scale=$v_scale,
t_scale=$t_scale,
+ ac_couple=$ac_couple,
+ xy_mode=$xy_mode,
num_inputs=$num_inputs,
)
-self.$(id).win.$(marker)()
#set $grid_pos = $grid_pos.eval
#if not grid_pos
self.Add(self.$(id).win)
#else
self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos[3])
#end if</make>
-<!--
-$(id).win.info.scopesink.set_trigger_channel($(trigger_channel))
-$(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) -->
<callback>set_sample_rate($samp_rate)</callback>
<param>
<name>Type</name>
@@ -58,12 +55,6 @@ $(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) -->
<type>real</type>
</param>
<param>
- <name>Frame Decimation</name>
- <key>frame_decim</key>
- <value>15</value>
- <type>int</type>
- </param>
- <param>
<name>V Scale</name>
<key>v_scale</key>
<value>0</value>
@@ -72,51 +63,39 @@ $(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) -->
<param>
<name>T Scale</name>
<key>t_scale</key>
- <value>.001</value>
+ <value>0</value>
<type>real</type>
</param>
<param>
- <name>Marker</name>
- <key>marker</key>
- <value>set_format_line</value>
+ <name>AC Couple</name>
+ <key>ac_couple</key>
+ <value>False</value>
<type>enum</type>
+ <hide>#if $ac_couple.eval == 'True' then 'none' else 'part'#</hide>
<option>
- <name>Line</name>
- <key>set_format_line</key>
- </option>
- <option>
- <name>Dot</name>
- <key>set_format_dot</key>
+ <name>Off</name>
+ <key>False</key>
</option>
<option>
- <name>Plus</name>
- <key>set_format_plus</key>
+ <name>On</name>
+ <key>True</key>
</option>
</param>
- <!-- <param>
- <name>Trigger Channel</name>
- <key>trigger_channel</key>
- <value>0</value>
- <type>int</type>
- </param>
<param>
- <name>Trigger Mode</name>
- <key>trigger_mode</key>
- <value>gr_TRIG_AUTO</value>
+ <name>XY Mode</name>
+ <key>xy_mode</key>
+ <value>False</value>
<type>enum</type>
+ <hide>#if $xy_mode.eval == 'True' then 'none' else 'part'#</hide>
<option>
- <name>Auto</name>
- <key>gr_TRIG_AUTO</key>
- </option>
- <option>
- <name>Positive Slope</name>
- <key>gr_TRIG_POS_SLOPE</key>
+ <name>Off</name>
+ <key>False</key>
</option>
<option>
- <name>Negative Slope</name>
- <key>gr_TRIG_NEG_SLOPE</key>
+ <name>On</name>
+ <key>True</key>
</option>
- </param> -->
+ </param>
<param>
<name>Num Inputs</name>
<key>num_inputs</key>
@@ -129,6 +108,7 @@ $(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) -->
<value></value>
<type>grid_pos</type>
</param>
+ <check>not $xy_mode or '$type' == 'complex' or $num_inputs != 1</check>
<sink>
<name>in</name>
<type>$type</type>
@@ -137,6 +117,10 @@ $(id).win.info.scopesink.set_trigger_mode(gr.$(trigger_mode)) -->
<doc>
Set the V Scale to 0 for the scope to auto-scale.
+Set the T Scale to 0 for automatic setting.
+
+XY Mode allows the scope to initialize as an XY plotter.
+
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
</doc>
</block>
diff --git a/grc/examples/simple/ber_simulation.grc b/grc/examples/simple/ber_simulation.grc
index 0e4ce64ed..8d7d74565 100644
--- a/grc/examples/simple/ber_simulation.grc
+++ b/grc/examples/simple/ber_simulation.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Thu Jul 24 14:28:06 2008</timestamp>
+ <timestamp>Thu Mar 19 11:08:59 2009</timestamp>
<block>
<key>options</key>
<param>
@@ -36,78 +36,12 @@
<value>Custom</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(16, 10)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_add_vxx</key>
- <param>
- <key>id</key>
- <value>gr_add_vxx</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>num_inputs</key>
- <value>2</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(652, 395)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>wxgui_constellationsink2</key>
- <param>
- <key>id</key>
- <value>wxgui_constellationsink2</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>title</key>
- <value>"Constellation: "+str(const)</value>
- </param>
- <param>
- <key>samp_rate</key>
- <value>samp_rate</value>
- </param>
- <param>
- <key>frame_decim</key>
- <value>15</value>
- </param>
- <param>
- <key>marker</key>
- <value>set_format_plus</value>
- </param>
- <param>
- <key>grid_pos</key>
- <value>2, 0, 1, 1</value>
+ <key>realtime_scheduling</key>
+ <value></value>
</param>
<param>
<key>_coordinate</key>
- <value>(907, 334)</value>
+ <value>(16, 10)</value>
</param>
<param>
<key>_rotation</key>
@@ -239,12 +173,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>options</key>
- <value>none</value>
+ <key>avg_alpha</key>
+ <value>0</value>
</param>
<param>
<key>show_gauge</key>
@@ -306,7 +244,7 @@
</param>
<param>
<key>type</key>
- <value>"BER"</value>
+ <value>'BER'</value>
</param>
<param>
<key>win_size</key>
@@ -483,6 +421,92 @@
<value>0</value>
</param>
</block>
+ <block>
+ <key>gr_add_vxx</key>
+ <param>
+ <key>id</key>
+ <value>gr_add_vxx</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(652, 395)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_scopesink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_scopesink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>"Constellation: "+str(const)</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>xy_mode</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>2, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(828, 368)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
<connection>
<source_block_id>blks2_error_rate</source_block_id>
<sink_block_id>wxgui_numbersink2</sink_block_id>
@@ -520,21 +544,21 @@
<sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>gr_add_vxx</source_block_id>
- <sink_block_id>wxgui_constellationsink2</sink_block_id>
+ <source_block_id>random_source_x</source_block_id>
+ <sink_block_id>gr_throttle</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>random_source_x</source_block_id>
- <sink_block_id>gr_throttle</sink_block_id>
+ <sink_block_id>gr_chunks_to_symbols_xx</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>random_source_x</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx</sink_block_id>
+ <source_block_id>gr_add_vxx</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
-</flow_graph> \ No newline at end of file
+</flow_graph>
diff --git a/grc/examples/trellis/interference_cancellation.grc b/grc/examples/trellis/interference_cancellation.grc
index 4065845fb..32e09f7f0 100644
--- a/grc/examples/trellis/interference_cancellation.grc
+++ b/grc/examples/trellis/interference_cancellation.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Tue Nov 18 00:48:20 2008</timestamp>
+ <timestamp>Thu Mar 19 11:22:40 2009</timestamp>
<block>
<key>options</key>
<param>
@@ -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>
@@ -411,37 +415,6 @@
</param>
</block>
<block>
- <key>gr_add_vxx</key>
- <param>
- <key>id</key>
- <value>gr_add_vxx_1</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>num_inputs</key>
- <value>2</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(1400, 262)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>gr_noise_source_x</key>
<param>
<key>id</key>
@@ -477,45 +450,6 @@
</param>
</block>
<block>
- <key>wxgui_constellationsink2</key>
- <param>
- <key>id</key>
- <value>wxgui_constellationsink2_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>title</key>
- <value>Constellation Plot</value>
- </param>
- <param>
- <key>samp_rate</key>
- <value>R</value>
- </param>
- <param>
- <key>frame_decim</key>
- <value>15</value>
- </param>
- <param>
- <key>marker</key>
- <value>set_format_plus</value>
- </param>
- <param>
- <key>grid_pos</key>
- <value></value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(1301, 74)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>gr_sub_xx</key>
<param>
<key>id</key>
@@ -530,6 +464,10 @@
<value>short</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
<key>num_inputs</key>
<value>2</value>
</param>
@@ -607,6 +545,10 @@
<value>short</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
<key>num_inputs</key>
<value>2</value>
</param>
@@ -750,6 +692,10 @@
<value>complex</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
<key>num_inputs</key>
<value>2</value>
</param>
@@ -777,6 +723,10 @@
<value>short</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
<key>num_inputs</key>
<value>2</value>
</param>
@@ -920,6 +870,10 @@
<value>complex</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
<key>num_inputs</key>
<value>2</value>
</param>
@@ -947,6 +901,10 @@
<value>short</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
<key>num_inputs</key>
<value>2</value>
</param>
@@ -1064,12 +1022,16 @@
<value>15</value>
</param>
<param>
- <key>avg_alpha</key>
- <value>0.001</value>
+ <key>peak_hold</key>
+ <value>False</value>
</param>
<param>
- <key>options</key>
- <value>average</value>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0.001</value>
</param>
<param>
<key>show_gauge</key>
@@ -1143,12 +1105,16 @@
<value>15</value>
</param>
<param>
- <key>avg_alpha</key>
- <value>0.001</value>
+ <key>peak_hold</key>
+ <value>False</value>
</param>
<param>
- <key>options</key>
- <value>average</value>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0.001</value>
</param>
<param>
<key>show_gauge</key>
@@ -1222,103 +1188,28 @@
<value>15</value>
</param>
<param>
- <key>avg_alpha</key>
- <value>0.001</value>
- </param>
- <param>
- <key>options</key>
- <value>average</value>
- </param>
- <param>
- <key>show_gauge</key>
- <value>True</value>
- </param>
- <param>
- <key>grid_pos</key>
- <value>1,0,1,1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(1269, 1417)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
+ <key>peak_hold</key>
+ <value>False</value>
</param>
- </block>
- <block>
- <key>wxgui_numbersink2</key>
<param>
- <key>id</key>
- <value>wxgui_numbersink2_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>float</value>
- </param>
- <param>
- <key>title</key>
- <value>BER 1 (raw)</value>
- </param>
- <param>
- <key>units</key>
- <value>BER</value>
- </param>
- <param>
- <key>samp_rate</key>
- <value>R</value>
- </param>
- <param>
- <key>base_value</key>
- <value>0.0</value>
- </param>
- <param>
- <key>min_value</key>
- <value>0</value>
- </param>
- <param>
- <key>max_value</key>
- <value>1</value>
- </param>
- <param>
- <key>factor</key>
- <value>1.0</value>
- </param>
- <param>
- <key>decimal_places</key>
- <value>6</value>
- </param>
- <param>
- <key>ref_level</key>
- <value>0</value>
- </param>
- <param>
- <key>number_rate</key>
- <value>15</value>
+ <key>average</key>
+ <value>False</value>
</param>
<param>
<key>avg_alpha</key>
<value>0.001</value>
</param>
<param>
- <key>options</key>
- <value>average</value>
- </param>
- <param>
<key>show_gauge</key>
<value>True</value>
</param>
<param>
<key>grid_pos</key>
- <value>0,0,1,1</value>
+ <value>1,0,1,1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(1267, 410)</value>
+ <value>(1269, 1417)</value>
</param>
<param>
<key>_rotation</key>
@@ -1715,6 +1606,175 @@
<value>0</value>
</param>
</block>
+ <block>
+ <key>gr_add_vxx</key>
+ <param>
+ <key>id</key>
+ <value>gr_add_vxx_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1400, 262)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_numbersink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_numbersink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>BER 1 (raw)</value>
+ </param>
+ <param>
+ <key>units</key>
+ <value>BER</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>R</value>
+ </param>
+ <param>
+ <key>base_value</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>min_value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max_value</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>factor</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>decimal_places</key>
+ <value>6</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>number_rate</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0.001</value>
+ </param>
+ <param>
+ <key>show_gauge</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0,0,1,1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1267, 410)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_scopesink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_scopesink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Scope Plot</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>R</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>xy_mode</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1533, 149)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
<connection>
<source_block_id>random_source_x_1</source_block_id>
<sink_block_id>trellis_encoder_xx_1</sink_block_id>
@@ -1758,12 +1818,6 @@
<sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>gr_add_vxx_1</source_block_id>
- <sink_block_id>wxgui_constellationsink2_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_chunks_to_symbols_xx_1</source_block_id>
<sink_block_id>gr_multiply_const_vxx_1</sink_block_id>
<source_key>0</source_key>
@@ -2009,4 +2063,10 @@
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
+ <connection>
+ <source_block_id>gr_add_vxx_1</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
</flow_graph>
diff --git a/grc/src/grc_gnuradio/wxgui/callback_controls.py b/grc/src/grc_gnuradio/wxgui/callback_controls.py
index 2f474cf9f..32e5d8842 100644
--- a/grc/src/grc_gnuradio/wxgui/callback_controls.py
+++ b/grc/src/grc_gnuradio/wxgui/callback_controls.py
@@ -26,7 +26,7 @@ class LabelText(wx.StaticText):
"""Label text class for uniform labels among all controls."""
def __init__(self, window, label):
- wx.StaticText.__init__(self, window, -1, str(label))
+ wx.StaticText.__init__(self, window, label=str(label))
font = self.GetFont()
font.SetWeight(wx.FONTWEIGHT_BOLD)
self.SetFont(font)
@@ -92,7 +92,7 @@ class button_control(_chooser_control_base):
"""House a button for variable control."""
def _init(self):
- self.button = wx.Button(self.get_window(), -1, self.labels[self.index])
+ self.button = wx.Button(self.get_window(), label=self.labels[self.index])
self.button.Bind(wx.EVT_BUTTON, self._handle_changed)
self.Add(self.button, 0, wx.ALIGN_CENTER)
@@ -107,7 +107,7 @@ class drop_down_control(_chooser_control_base):
"""House a drop down for variable control."""
def _init(self):
- self.drop_down = wx.Choice(self.get_window(), -1, choices=self.labels)
+ self.drop_down = wx.Choice(self.get_window(), choices=self.labels)
self.Add(self.drop_down, 0, wx.ALIGN_CENTER)
self.drop_down.Bind(wx.EVT_CHOICE, self._handle_changed)
self.drop_down.SetSelection(self.index)
@@ -124,13 +124,13 @@ class _radio_buttons_control_base(_chooser_control_base):
def _init(self):
#create box for radio buttons
radio_box = wx.BoxSizer(self.radio_box_orientation)
- panel = wx.Panel(self.get_window(), -1)
+ panel = wx.Panel(self.get_window())
panel.SetSizer(radio_box)
self.Add(panel, 0, wx.ALIGN_CENTER)
#create radio buttons
self.radio_buttons = list()
for label in self.labels:
- radio_button = wx.RadioButton(panel, -1, label)
+ radio_button = wx.RadioButton(panel, label=label)
radio_button.SetValue(False)
self.radio_buttons.append(radio_button)
radio_box.Add(radio_button, 0, self.radio_button_align)
@@ -177,13 +177,13 @@ class _slider_control_base(_control_base):
#create gui elements
label_text_sizer = wx.BoxSizer(self.label_text_orientation) #label and text box container
label_text = LabelText(self.get_window(), '%s: '%str(label))
- self.text_box = text_box = wx.TextCtrl(self.get_window(), -1, str(value), style=wx.TE_PROCESS_ENTER)
+ self.text_box = text_box = wx.TextCtrl(self.get_window(), style=wx.TE_PROCESS_ENTER)
text_box.Bind(wx.EVT_TEXT_ENTER, self._handle_enter) #bind this special enter hotkey event
for obj in (label_text, text_box): #fill the container with label and text entry box
- label_text_sizer.Add(obj, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL)
+ label_text_sizer.Add(obj, 0, wx.ALIGN_CENTER)
self.Add(label_text_sizer, 0, wx.ALIGN_CENTER)
#make the slider
- self.slider = slider = wx.Slider(self.get_window(), -1, size=wx.Size(*self.get_slider_size()), style=self.slider_style)
+ self.slider = slider = wx.Slider(self.get_window(), size=wx.Size(*self.get_slider_size()), style=self.slider_style)
try: slider.SetRange(0, num_steps)
except Exception, e:
print >> sys.stderr, 'Error in set slider range: "%s".'%e
@@ -245,11 +245,11 @@ class _slider_control_base(_control_base):
class slider_horizontal_control(_slider_control_base):
label_text_orientation = wx.HORIZONTAL
slider_style = wx.SL_HORIZONTAL
- def get_slider_size(self): return self.slider_length, 20
+ def get_slider_size(self): return self.slider_length, -1
class slider_vertical_control(_slider_control_base):
label_text_orientation = wx.VERTICAL
slider_style = wx.SL_VERTICAL
- def get_slider_size(self): return 20, self.slider_length
+ def get_slider_size(self): return -1, self.slider_length
##############################################################################################
# Text Box Control
@@ -271,10 +271,10 @@ class text_box_control(_control_base):
#create gui elements
label_text_sizer = wx.BoxSizer(wx.HORIZONTAL) #label and text box container
label_text = LabelText(self.get_window(), '%s: '%str(label))
- self.text_box = text_box = wx.TextCtrl(self.get_window(), -1, str(value), style=wx.TE_PROCESS_ENTER)
+ self.text_box = text_box = wx.TextCtrl(self.get_window(), value=str(value), style=wx.TE_PROCESS_ENTER)
text_box.Bind(wx.EVT_TEXT_ENTER, self._handle_enter) #bind this special enter hotkey event
for obj in (label_text, text_box): #fill the container with label and text entry box
- label_text_sizer.Add(obj, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL)
+ label_text_sizer.Add(obj, 0, wx.ALIGN_CENTER)
self.Add(label_text_sizer, 0, wx.ALIGN_CENTER)
#detect string mode
self._string_mode = isinstance(value, str)