aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Long <willcode4@gmail.com>2021-07-13 07:23:48 -0400
committerJeff Long <willcode4@gmail.com>2021-07-19 20:06:50 -0400
commitb01732c318279670af3dbd58ceb23fd47f09ed76 (patch)
treed26f219fbd222ad8d4fd69d492a1dbb9944aed68
parentgrc: update disabled blocks if they depend on others (diff)
downloadgnuradio-b01732c318279670af3dbd58ceb23fd47f09ed76.tar.xz
gnuradio-b01732c318279670af3dbd58ceb23fd47f09ed76.zip
grc: allow short and byte as valid types in an enum
Signed-off-by: Jeff Long <willcode4@gmail.com> (cherry picked from commit 256953bebab151c50fd9a32156f75d2aabc14c17) Signed-off-by: Jeff Long <willcode4@gmail.com>
-rw-r--r--gr-analog/grc/analog_const_source_x.block.yml2
-rw-r--r--grc/core/Constants.py2
-rw-r--r--grc/core/params/param.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/gr-analog/grc/analog_const_source_x.block.yml b/gr-analog/grc/analog_const_source_x.block.yml
index 929ed6496..3fdb883d7 100644
--- a/gr-analog/grc/analog_const_source_x.block.yml
+++ b/gr-analog/grc/analog_const_source_x.block.yml
@@ -8,7 +8,7 @@ parameters:
dtype: enum
options: [complex, float, int, short, byte]
option_attributes:
- const_type: [complex, real, int, short, gr.sizeof_char]
+ const_type: [complex, real, int, short, byte]
fcn: [c, f, i, s, b]
hide: part
- id: const
diff --git a/grc/core/Constants.py b/grc/core/Constants.py
index e7d8f3f99..2d408aea4 100644
--- a/grc/core/Constants.py
+++ b/grc/core/Constants.py
@@ -58,7 +58,7 @@ HIER_BLOCK_FILE_MODE = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP
PARAM_TYPE_NAMES = {
'raw', 'enum',
- 'complex', 'real', 'float', 'int',
+ 'complex', 'real', 'float', 'int', 'short', 'byte',
'complex_vector', 'real_vector', 'float_vector', 'int_vector',
'hex', 'string', 'bool',
'file_open', 'file_save', '_multiline', '_multiline_python_external',
diff --git a/grc/core/params/param.py b/grc/core/params/param.py
index b3570b946..73ad151f7 100644
--- a/grc/core/params/param.py
+++ b/grc/core/params/param.py
@@ -218,7 +218,7 @@ class Param(Element):
#########################
# Numeric Types
#########################
- elif dtype in ('raw', 'complex', 'real', 'float', 'int', 'hex', 'bool'):
+ elif dtype in ('raw', 'complex', 'real', 'float', 'int', 'short', 'byte', 'hex', 'bool'):
if expr:
try:
if isinstance(expr, str) and self.is_float(expr[:-1]):