summaryrefslogtreecommitdiff
path: root/gr-uhd/swig/__init__.py
diff options
context:
space:
mode:
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