summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
Diffstat (limited to 'grc')
-rw-r--r--grc/base/Platform.py12
-rw-r--r--grc/blocks/Makefile.am1
-rw-r--r--grc/blocks/block_tree.xml2
-rw-r--r--grc/blocks/gr_int_to_float.xml20
-rw-r--r--grc/python/flow_graph.tmpl2
5 files changed, 35 insertions, 2 deletions
diff --git a/grc/base/Platform.py b/grc/base/Platform.py
index 51a3b2f87..096fdec41 100644
--- a/grc/base/Platform.py
+++ b/grc/base/Platform.py
@@ -1,5 +1,5 @@
"""
-Copyright 2008, 2009 Free Software Foundation, Inc.
+Copyright 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion is free software; you can redistribute it and/or
@@ -17,6 +17,16 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
+#Perform python integrity checks:
+# GRC will not work with interpreters that fail the checks below.
+# This can fail on interpreters built with special optimizations.
+try:
+ assert False
+ raise Exception, 'Failed python integrity check: assert not supported'
+except AssertionError: pass
+if __doc__ is None:
+ raise Exception, 'Failed python integrity check: __doc__ not supported'
+
import os
import sys
from .. base import ParseXML, odict
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am
index 6f7802169..fc2d3f161 100644
--- a/grc/blocks/Makefile.am
+++ b/grc/blocks/Makefile.am
@@ -119,6 +119,7 @@ dist_ourdata_DATA = \
gr_head.xml \
gr_hilbert_fc.xml \
gr_iir_filter_ffd.xml \
+ gr_int_to_float.xml \
gr_integrate_xx.xml \
gr_interleave.xml \
gr_interleaved_short_to_complex.xml \
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 549ffbdbf..e7aa7c810 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -76,6 +76,8 @@
<block>gr_float_to_short</block>
<block>gr_short_to_float</block>
+ <block>gr_int_to_float</block>
+
<block>gr_float_to_char</block>
<block>gr_char_to_float</block>
diff --git a/grc/blocks/gr_int_to_float.xml b/grc/blocks/gr_int_to_float.xml
new file mode 100644
index 000000000..8e6d024e2
--- /dev/null
+++ b/grc/blocks/gr_int_to_float.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Int to Float:
+###################################################
+ -->
+<block>
+ <name>Int To Float</name>
+ <key>gr_int_to_float</key>
+ <import>from gnuradio import gr</import>
+ <make>gr.int_to_float()</make>
+ <sink>
+ <name>in</name>
+ <type>int</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index 5aaa99793..e16e86f5b 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -243,9 +243,9 @@ if __name__ == '__main__':
tb.show()
qapp.exec_()
#elif $generate_options == 'no_gui'
+ tb = $(class_name)($(', '.join($params_eq_list)))
#set $run_options = $flow_graph.get_option('run_options')
#if $run_options == 'prompt'
- tb = $(class_name)($(', '.join($params_eq_list)))
tb.start()
raw_input('Press Enter to quit: ')
tb.stop()