diff options
author | Michael Dickens <michael.dickens@ettus.com> | 2018-02-08 13:50:04 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-14 21:04:55 -0800 |
commit | 573d4c89f9ef4151b76eec8487c71adf4bbeebb0 (patch) | |
tree | a7cc567d5bd80624f51ac269d415ffc4e67afc2f /gr-blocks/lib | |
parent | f783dd54a2a81bbd7a03b17e26a5563199c52015 (diff) |
blocks: add threshold set and get to plateau detector
Also add the callback to the GRC block.
Diffstat (limited to 'gr-blocks/lib')
-rw-r--r-- | gr-blocks/lib/plateau_detector_fb_impl.cc | 10 | ||||
-rw-r--r-- | gr-blocks/lib/plateau_detector_fb_impl.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gr-blocks/lib/plateau_detector_fb_impl.cc b/gr-blocks/lib/plateau_detector_fb_impl.cc index 14d52b392c..f074f30131 100644 --- a/gr-blocks/lib/plateau_detector_fb_impl.cc +++ b/gr-blocks/lib/plateau_detector_fb_impl.cc @@ -86,6 +86,16 @@ namespace gr { return i; } + void plateau_detector_fb_impl::set_threshold(float threshold) + { + d_threshold = threshold; + } + + float plateau_detector_fb_impl::threshold() const + { + return d_threshold; + } + } /* namespace blocks */ } /* namespace gr */ diff --git a/gr-blocks/lib/plateau_detector_fb_impl.h b/gr-blocks/lib/plateau_detector_fb_impl.h index 906891d62b..1a99745104 100644 --- a/gr-blocks/lib/plateau_detector_fb_impl.h +++ b/gr-blocks/lib/plateau_detector_fb_impl.h @@ -44,6 +44,9 @@ class plateau_detector_fb_impl : public plateau_detector_fb gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); + + virtual void set_threshold(float threshold); + virtual float threshold() const; }; } // namespace blocks |