summaryrefslogtreecommitdiff
path: root/gr-blocks/grc
diff options
context:
space:
mode:
authorJohnathan Corgan2012-06-19 10:00:28 -0700
committerJohnathan Corgan2012-06-19 10:00:28 -0700
commit439b427e80ebc767db6e4e732213d89c2a6febd4 (patch)
tree26e92d8a768ffcb4216e594135f31f227804f87e /gr-blocks/grc
parent24962cd24c623c6822733fed4c911a4adabbdd57 (diff)
downloadgnuradio-439b427e80ebc767db6e4e732213d89c2a6febd4.tar.gz
gnuradio-439b427e80ebc767db6e4e732213d89c2a6febd4.tar.bz2
gnuradio-439b427e80ebc767db6e4e732213d89c2a6febd4.zip
blocks: added gr::blocks::char_to_float
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r--gr-blocks/grc/blocks_block_tree.xml5
-rw-r--r--gr-blocks/grc/blocks_char_to_float.xml35
2 files changed, 40 insertions, 0 deletions
diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml
index b1680497b..ae540d3b1 100644
--- a/gr-blocks/grc/blocks_block_tree.xml
+++ b/gr-blocks/grc/blocks_block_tree.xml
@@ -37,4 +37,9 @@
<block>blocks_multiply_const_vxx</block>
<block>blocks_sub_xx</block>
</cat>
+ <cat>
+ <name>Type Conversions</name>
+ <block>blocks_char_to_float</block>
+ </cat>
+
</cat>
diff --git a/gr-blocks/grc/blocks_char_to_float.xml b/gr-blocks/grc/blocks_char_to_float.xml
new file mode 100644
index 000000000..5d367d719
--- /dev/null
+++ b/gr-blocks/grc/blocks_char_to_float.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Char to Float:
+###################################################
+ -->
+<block>
+ <name>Char To Float</name>
+ <key>blocks_char_to_float</key>
+ <import>from gnuradio import blocks</import>
+ <make>blocks.char_to_float($vlen, $scale)</make>
+ <callback>set_scale($scale)</callback>
+ <param>
+ <name>Vec Length</name>
+ <key>vlen</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Scale</name>
+ <key>scale</key>
+ <value>1</value>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ <vlen>$vlen</vlen>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ <vlen>$vlen</vlen>
+ </source>
+</block>