![]() |
WPILibC++ 2025.3.2
|
Class to enable glitch filtering on a set of digital inputs. More...
#include <frc/DigitalGlitchFilter.h>
Public Member Functions | |
| DigitalGlitchFilter () | |
| ~DigitalGlitchFilter () override | |
| DigitalGlitchFilter (DigitalGlitchFilter &&)=default | |
| DigitalGlitchFilter & | operator= (DigitalGlitchFilter &&)=default |
| void | Add (DigitalSource *input) |
| Assigns the DigitalSource to this glitch filter. | |
| void | Add (Encoder *input) |
| Assigns the Encoder to this glitch filter. | |
| void | Add (Counter *input) |
| Assigns the Counter to this glitch filter. | |
| void | Remove (DigitalSource *input) |
| Removes a digital input from this filter. | |
| void | Remove (Encoder *input) |
| Removes an encoder from this filter. | |
| void | Remove (Counter *input) |
| Removes a counter from this filter. | |
| void | SetPeriodCycles (int fpgaCycles) |
| Sets the number of cycles that the input must not change state for. | |
| void | SetPeriodNanoSeconds (uint64_t nanoseconds) |
| Sets the number of nanoseconds that the input must not change state for. | |
| int | GetPeriodCycles () |
| Gets the number of cycles that the input must not change state for. | |
| uint64_t | GetPeriodNanoSeconds () |
| Gets the number of nanoseconds that the input must not change state for. | |
| void | InitSendable (wpi::SendableBuilder &builder) override |
| Initializes this Sendable object. | |
Public Member Functions inherited from wpi::Sendable | |
| virtual constexpr | ~Sendable ()=default |
Public Member Functions inherited from wpi::SendableHelper< DigitalGlitchFilter > | |
| constexpr | SendableHelper (const SendableHelper &rhs)=default |
| constexpr | SendableHelper (SendableHelper &&rhs) |
| constexpr SendableHelper & | operator= (const SendableHelper &rhs)=default |
| constexpr SendableHelper & | operator= (SendableHelper &&rhs) |
Additional Inherited Members | |
Protected Member Functions inherited from wpi::SendableHelper< DigitalGlitchFilter > | |
| constexpr | SendableHelper ()=default |
| constexpr | ~SendableHelper () |
Class to enable glitch filtering on a set of digital inputs.
This class will manage adding and removing digital inputs from a FPGA glitch filter. The filter lets the user configure the time that an input must remain high or low before it is classified as high or low.
| frc::DigitalGlitchFilter::DigitalGlitchFilter | ( | ) |
|
override |
|
default |
| void frc::DigitalGlitchFilter::Add | ( | Counter * | input | ) |
| void frc::DigitalGlitchFilter::Add | ( | DigitalSource * | input | ) |
Assigns the DigitalSource to this glitch filter.
| input | The DigitalSource to add. |
| void frc::DigitalGlitchFilter::Add | ( | Encoder * | input | ) |
| int frc::DigitalGlitchFilter::GetPeriodCycles | ( | ) |
Gets the number of cycles that the input must not change state for.
| uint64_t frc::DigitalGlitchFilter::GetPeriodNanoSeconds | ( | ) |
Gets the number of nanoseconds that the input must not change state for.
|
overridevirtual |
|
default |
| void frc::DigitalGlitchFilter::Remove | ( | Counter * | input | ) |
| void frc::DigitalGlitchFilter::Remove | ( | DigitalSource * | input | ) |
Removes a digital input from this filter.
Removes the DigitalSource from this glitch filter and re-assigns it to the default filter.
| input | The DigitalSource to remove. |
| void frc::DigitalGlitchFilter::Remove | ( | Encoder * | input | ) |
| void frc::DigitalGlitchFilter::SetPeriodCycles | ( | int | fpgaCycles | ) |
Sets the number of cycles that the input must not change state for.
| fpgaCycles | The number of FPGA cycles. |
| void frc::DigitalGlitchFilter::SetPeriodNanoSeconds | ( | uint64_t | nanoseconds | ) |
Sets the number of nanoseconds that the input must not change state for.
| nanoseconds | The number of nanoseconds. |