53 m_windowTime = windowTime;
62 constexpr units::second_t
GetWindowTime()
const {
return m_windowTime; }
71 m_requiredEdges = requiredEdges;
83 units::second_t m_windowTime;
85 units::second_t m_firstEdgeTime;
86 int m_currentCount = 0;
88 bool m_lastInput =
false;
92 bool HasElapsed()
const;
#define WPILIB_DLLEXPORT
Definition SymbolExports.h:36
A rising edge counter for boolean streams.
Definition EdgeCountFilter.h:25
constexpr units::second_t GetWindowTime() const
Gets the time window duration.
Definition EdgeCountFilter.h:62
constexpr int GetRequiredEdges() const
Gets the required number of edges.
Definition EdgeCountFilter.h:79
EdgeCounterFilter(int requiredEdges, units::second_t windowTime)
Creates a new EdgeCounterFilter.
constexpr void SetRequiredEdges(int requiredEdges)
Sets the required number of edges.
Definition EdgeCountFilter.h:70
constexpr void SetWindowTime(units::second_t windowTime)
Sets the time window duration.
Definition EdgeCountFilter.h:52
bool Calculate(bool input)
Applies the edge counter filter to the input stream.