From dd74b98a42f5e79c4d464cfa745b3f8af51e486e Mon Sep 17 00:00:00 2001
From: Marcus Leech <mleech@ripnet.com>
Date: Sun, 17 Oct 2010 17:20:04 -0400
Subject: Adds a new parameter "y_axis_label" to scopesink2 and the GRC .xml
 file that contains the string for the Y axis label.  It defaults to 'Counts'
 to be consistent with the old version.

---
 grc/blocks/wxgui_scopesink2.xml | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'grc')

diff --git a/grc/blocks/wxgui_scopesink2.xml b/grc/blocks/wxgui_scopesink2.xml
index 50cd977be2..ef03773739 100644
--- a/grc/blocks/wxgui_scopesink2.xml
+++ b/grc/blocks/wxgui_scopesink2.xml
@@ -21,6 +21,7 @@ scopesink2.$(type.fcn)(
 	xy_mode=$xy_mode,
 	num_inputs=$num_inputs,
 	trig_mode=$trig_mode,
+	y_axis_label=$y_axis_label,
 #if $win_size()
 	size=$win_size,
 #end if
@@ -156,6 +157,12 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
 			<key>gr.gr_TRIG_MODE_STRIPCHART</key>
 		</option>
 	</param>
+	<param>
+		<name>Y Axis Label</name>
+		<key>y_axis_label</key>
+		<value>Counts</value>
+		<type>string</type>
+	</param>
 	<check>not $win_size or len($win_size) == 2</check>
 	<check>not $xy_mode or '$type' == 'complex' or $num_inputs != 1</check>
 	<sink>
-- 
cgit v1.2.3


From 2aef04843d248d0584b4865c62d7ca0772113dc9 Mon Sep 17 00:00:00 2001
From: Josh Blum <josh@joshknows.com>
Date: Thu, 28 Oct 2010 17:22:25 -0700
Subject: uhd: added ref clock option to single usrp blocks, minor grc fix on
 empty option keys

---
 gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py | 22 ++++++++++++++++++++++
 grc/base/Param.py                            |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)

(limited to 'grc')

diff --git a/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py b/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
index 9b6422f7a2..7337c71d7b 100755
--- a/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
+++ b/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
@@ -30,6 +30,13 @@ MAIN_TMPL = """\
 	io_type=uhd.io_type_t.\$type.type,
 	num_channels=\$nchan,
 )
+\#if \$ref_clk()
+_clk_cfg = uhd.clock_config_t()
+_clk_cfg.ref_source = uhd.clock_config_t.REF_SMA
+_clk_cfg.pps_source = uhd.clock_config_t.PPS_SMA
+_clk_cfg.pps_polarity = uhd.clock_config_t.PPS_POS
+self.\$(id).set_clock_config(_clk_cfg);
+\#end if
 \#if \$sd_spec()
 self.\$(id).set_subdev_spec(\$sd_spec)
 \#end if
@@ -103,6 +110,21 @@ self.\$(id).set_bandwidth(\$bw$(n), $n)
 			\#end if
 		</hide>
 	</param>
+	<param>
+		<name>Ref Clock</name>
+		<key>ref_clk</key>
+		<value></value>
+		<type>enum</type>
+		<hide>\#if \$ref_clk() then 'none' else 'part'#</hide>
+		<option>
+			<name>External</name>
+			<key>ext</key>
+		</option>
+		<option>
+			<name>Internal</name>
+			<key></key>
+		</option>
+	</param>
 	<param>
 		<name>Subdev Spec</name>
 		<key>sd_spec</key>
diff --git a/grc/base/Param.py b/grc/base/Param.py
index e56eac36e1..5cd0f9d6d8 100644
--- a/grc/base/Param.py
+++ b/grc/base/Param.py
@@ -94,7 +94,7 @@ class Param(Element):
 				try: assert set(opt_keys) == set(option.get_opt_keys())
 				except AssertionError: raise Exception, 'Opt keys "%s" are not identical across all options.'%opt_keys
 			#if a value is specified, it must be in the options keys
-			self._value = value or self.get_option_keys()[0]
+			self._value = value if value or value in self.get_option_keys() else self.get_option_keys()[0]
 			try: assert self.get_value() in self.get_option_keys()
 			except AssertionError: raise Exception, 'The value "%s" is not in the possible values of "%s".'%(self.get_value(), self.get_option_keys())
 		else: self._value = value or ''
-- 
cgit v1.2.3