diff options
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r-- | gr-blocks/grc/blocks_block_tree.xml | 3 | ||||
-rw-r--r-- | gr-blocks/grc/blocks_float_to_char.xml | 35 |
2 files changed, 37 insertions, 1 deletions
diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml index 537de92cc..eb0cdd79c 100644 --- a/gr-blocks/grc/blocks_block_tree.xml +++ b/gr-blocks/grc/blocks_block_tree.xml @@ -23,7 +23,7 @@ <!-- ################################################### -##Block Tree for GR Digital blocks. +##Block Tree for gr-blocks. ################################################### --> <cat> @@ -48,5 +48,6 @@ <block>blocks_complex_to_mag</block> <block>blocks_complex_to_mag_squared</block> <block>blocks_complex_to_arg</block> + <block>float_to_char</block> </cat> </cat> diff --git a/gr-blocks/grc/blocks_float_to_char.xml b/gr-blocks/grc/blocks_float_to_char.xml new file mode 100644 index 000000000..e3854fc4e --- /dev/null +++ b/gr-blocks/grc/blocks_float_to_char.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Float to Char: +################################################### + --> +<block> + <name>Float To Char</name> + <key>blocks_float_to_char</key> + <import>from gnuradio import blocks</import> + <make>blocks.float_to_char($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>float</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>byte</type> + <vlen>$vlen</vlen> + </source> +</block> |