feat: a pulse whose width is wrong can be the trigger's event, so a glitch can be caught
This commit is contained in:
1 parent
b3fd9ae00f
commit
d147678b1c
3 files changed
+245
-1
No files matched your search
@@ -82,10 +82,18 @@ class EventDetector {
|
||||
return prev_ > cond_.level && v <= cond_.level;
|
||||
}
|
||||
double feed_edge(double value, double t) noexcept;
|
||||
double feed_pulse(double value, double t) noexcept;
|
||||
/// Whether a measured width satisfies `cond_.cmp`. `Within`/`Outside` take their two
|
||||
/// bounds in either order, so a panel cannot make an empty band by typing the larger
|
||||
/// figure into the first spin.
|
||||
bool qualifies(double width_s) const noexcept;
|
||||
|
||||
EventCondition cond_{};
|
||||
bool have_prev_ = false;
|
||||
double prev_ = 0.0;
|
||||
bool in_pulse_ = false; ///< PulseWidth: an opening edge has been seen.
|
||||
bool pulse_up_ = false; ///< PulseWidth: its polarity, so we know which edge closes it.
|
||||
double pulse_start_s_ = 0.0;
|
||||
};
|
||||
|
||||
} // namespace udpscope
|
||||
Reference in new issue
Block a user