summaryrefslogtreecommitdiff
path: root/gr-blocks/grc/blocks_peak_detector_xb.block.yml
diff options
context:
space:
mode:
Diffstat (limited to 'gr-blocks/grc/blocks_peak_detector_xb.block.yml')
-rw-r--r--gr-blocks/grc/blocks_peak_detector_xb.block.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/gr-blocks/grc/blocks_peak_detector_xb.block.yml b/gr-blocks/grc/blocks_peak_detector_xb.block.yml
new file mode 100644
index 0000000000..be0f238391
--- /dev/null
+++ b/gr-blocks/grc/blocks_peak_detector_xb.block.yml
@@ -0,0 +1,47 @@
+id: blocks_peak_detector_xb
+label: Peak Detector
+
+parameters:
+- id: type
+ label: Input Type
+ dtype: enum
+ options: [float, int, short]
+ option_attributes:
+ fcn: [f, i, s]
+ hide: part
+- id: threshold_factor_rise
+ label: TH Factor Rise
+ dtype: real
+ default: '0.25'
+- id: threshold_factor_fall
+ label: TH Factor Fall
+ dtype: real
+ default: '0.40'
+- id: look_ahead
+ label: Look Ahead
+ dtype: int
+ default: '10'
+- id: alpha
+ label: Alpha
+ dtype: real
+ default: '0.001'
+
+inputs:
+- domain: stream
+ dtype: ${ type }
+
+outputs:
+- domain: stream
+ dtype: byte
+
+templates:
+ imports: from gnuradio import blocks
+ make: blocks.peak_detector_${type.fcn}b(${threshold_factor_rise}, ${threshold_factor_fall},
+ ${look_ahead}, ${alpha})
+ callbacks:
+ - set_threshold_factor_rise(${threshold_factor_rise})
+ - set_threshold_factor_fall(${threshold_factor_fall})
+ - set_look_ahead(${look_ahead})
+ - set_alpha(${alpha})
+
+file_format: 1