Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Krimm <[email protected]>
  • Loading branch information
wirew0rm committed Dec 3, 2024
1 parent e2f1e7b commit 0a843d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions blocks/basic/include/gnuradio-4.0/basic/Trigger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ The information is stored (info only) in `trigger_name`, `trigger_time`, `trigge
template<typename U, gr::meta::fixed_string description = "", typename... Arguments>
using A = gr::Annotated<U, description, Arguments...>;
constexpr static std::size_t N_HISTORY = 16UZ;
using value_t = meta::fundamental_base_value_type_t<T>;

PortIn<T> in;
PortOut<T> out;

A<T, "offset", Doc<"trigger offset">, Visible> offset{T(0)};
A<T, "threshold", Doc<"trigger threshold">, Visible> threshold{T(1)};
A<value_t, "offset", Doc<"trigger offset">, Visible> offset{value_t(0)};
A<value_t, "threshold", Doc<"trigger threshold">, Visible> threshold{value_t(1)};
A<std::string, "rising trigger", Doc<"trigger name generated on detected rising edge (N.B. \"\" omits trigger)">, Visible> trigger_name_rising_edge{magic_enum::enum_name(RISING)};
A<std::string, "falling trigger", Doc<"trigger name generated on detected falling edge (N.B. \"\" omits trigger)">, Visible> trigger_name_falling_edge{magic_enum::enum_name(FALLING)};
A<float, "avg. sample rate", Visible> sample_rate = 1.f;
Expand Down Expand Up @@ -141,6 +142,6 @@ The information is stored (info only) in `trigger_name`, `trigger_time`, `trigge

const inline auto registerTrigger = gr::registerBlock<gr::blocks::basic::SchmittTrigger, gr::trigger::InterpolationMethod::NO_INTERPOLATION, std::int16_t, std::int32_t, float, gr::UncertainValue<float>>(gr::globalBlockRegistry()) //
+ gr::registerBlock<gr::blocks::basic::SchmittTrigger, gr::trigger::InterpolationMethod::BASIC_LINEAR_INTERPOLATION, std::int16_t, std::int32_t, float, gr::UncertainValue<float>>(gr::globalBlockRegistry()) //
gr::registerBlock<gr::blocks::basic::SchmittTrigger, gr::trigger::InterpolationMethod::LINEAR_INTERPOLATION, std::int16_t, std::int32_t, float, gr::UncertainValue<float>>(gr::globalBlockRegistry());
+ gr::registerBlock<gr::blocks::basic::SchmittTrigger, gr::trigger::InterpolationMethod::LINEAR_INTERPOLATION, std::int16_t, std::int32_t, float, gr::UncertainValue<float>>(gr::globalBlockRegistry());

#endif // TRIGGER_HPP

0 comments on commit 0a843d7

Please sign in to comment.