summaryrefslogtreecommitdiff
path: root/gr-blocks/grc/blocks_float_to_char.block.yml
diff options
context:
space:
mode:
Diffstat (limited to 'gr-blocks/grc/blocks_float_to_char.block.yml')
-rw-r--r--gr-blocks/grc/blocks_float_to_char.block.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/gr-blocks/grc/blocks_float_to_char.block.yml b/gr-blocks/grc/blocks_float_to_char.block.yml
new file mode 100644
index 0000000000..4f6eeb7286
--- /dev/null
+++ b/gr-blocks/grc/blocks_float_to_char.block.yml
@@ -0,0 +1,31 @@
+id: blocks_float_to_char
+label: Float To Char
+
+parameters:
+- id: vlen
+ label: Vec Length
+ dtype: int
+ default: '1'
+ hide: ${ 'part' if vlen == 1 else 'none' }
+- id: scale
+ label: Scale
+ dtype: real
+ default: '1'
+
+inputs:
+- domain: stream
+ dtype: float
+ vlen: ${ vlen }
+
+outputs:
+- domain: stream
+ dtype: byte
+ vlen: ${ vlen }
+
+templates:
+ imports: from gnuradio import blocks
+ make: blocks.float_to_char(${vlen}, ${scale})
+ callbacks:
+ - set_scale(${scale})
+
+file_format: 1