summaryrefslogtreecommitdiff
path: root/gr-uhd/swig/__init__.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2010-11-16 07:56:14 -0800
committerTom Rondeau <trondeau@vt.edu>2010-11-16 07:56:14 -0800
commit559d397de9ba937f470d27a7ad8b8d15f8f2f90f (patch)
tree221f32c0c10e55f9072fb22623e01fcd1dd63353 /gr-uhd/swig/__init__.py
parenta6b5781e36ff75adb1e4d39d755d4ab8f5efd9dd (diff)
parent53eee1c624794056fcba50a5eb50b864cbf159dd (diff)
Merge branch 'next' into tagging
Diffstat (limited to 'gr-uhd/swig/__init__.py')
-rw-r--r--gr-uhd/swig/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/gr-uhd/swig/__init__.py b/gr-uhd/swig/__init__.py
index 2fed17e578..0fdacb796c 100644
--- a/gr-uhd/swig/__init__.py
+++ b/gr-uhd/swig/__init__.py
@@ -21,8 +21,20 @@
# The presence of this file turns this directory into a Python package
+########################################################################
# Add SWIG generated code to this namespace
+########################################################################
from uhd_swig import *
+########################################################################
# Add other content from pure-Python modules here
+########################################################################
+class tune_request_t(tune_request_t, float):
+ """
+ Make the python tune request object inherit from float
+ so that it can be passed in GRC as a frequency parameter.
+ The type checking in GRC will accept the tune request.
+ """
+ def __new__(self, *args): return float.__new__(self)
+ def __float__(self): return self.target_freq