diff --git a/src/condition.cpp b/src/condition.cpp index f02a403..7a7681a 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -119,8 +119,8 @@ double EventDetector::feed_window(double value, double t) noexcept { if (inside == inside_) return kNoEvent; inside_ = inside; // The event is the *change of side*, so `Rising` reads as "into the band" and `Falling` - // as "out of it". A band of zero width therefore never fires at all, because no sample - // can be on a different side of it than its neighbour: the panel refuses one. + // as "out of it". A band of zero width reduces the condition to an equality test on a + // real-valued signal, which is a float-equality test and therefore unusable: the panel refuses one. const bool fired = (cond_.edge == TriggerEdge::Rising && inside) || (cond_.edge == TriggerEdge::Falling && !inside) || cond_.edge == TriggerEdge::Both; diff --git a/src/condition.hpp b/src/condition.hpp index 768054b..2abba10 100644 --- a/src/condition.hpp +++ b/src/condition.hpp @@ -72,7 +72,6 @@ class EventDetector { double last_value() const noexcept { return prev_; } bool have_last() const noexcept { return have_prev_; } - const EventCondition& condition() const noexcept { return cond_; } private: bool crossed_up(double v) const noexcept { diff --git a/src/search.cpp b/src/search.cpp index 2f28bb1..012e58b 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -18,7 +18,6 @@ double ms_since(const std::chrono::steady_clock::time_point& t0) { void BufferSearch::start(const EventCondition& c, int channel) { clear(); - condition_ = c; channel_ = channel; detector_.reset(); detector_.configure(c); diff --git a/src/search.hpp b/src/search.hpp index cb1b753..4832cf8 100644 --- a/src/search.hpp +++ b/src/search.hpp @@ -57,7 +57,6 @@ class BufferSearch { bool pump(ScopeModel& model); State state() const noexcept { return state_; } - int channel() const noexcept { return channel_; } const std::vector& hits() const noexcept { return hits_; } /// Which hit the view is on, or -1 for none. int cursor() const noexcept { return cursor_; } @@ -77,7 +76,6 @@ class BufferSearch { private: EventDetector detector_{}; - EventCondition condition_{}; int channel_ = -1; State state_ = State::Idle; bool started_ = false; ///< the index range has been established.