![]() |
2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
|
A simple hysteresis filter for giving a bool output for a threshold. More...
#include <hysteresis_filter.h>
Public Member Functions | |
| HysteresisFilter ()=delete | |
| HysteresisFilter (T deactivateThreshold, T activateThreshold) | |
| Construct a new Hysteresis Filter object. More... | |
| bool | operator() (T newValue) |
| Gets new status after applying hysteresis. More... | |
Private Attributes | |
| const T | m_activateThreshold |
| Threshold above which output becomes true. More... | |
| const T | m_deactivateThreshold |
| Threshold below which output becomes false. More... | |
| bool | m_currentState |
| Latest state after applying hysteresis. More... | |
A simple hysteresis filter for giving a bool output for a threshold.
| T | Type of threshold values |
|
delete |
|
inline |
Construct a new Hysteresis Filter object.
| deactivateThreshold | Value below which output becomes false |
| activateThreshold | Value above which output becomes true |
|
inline |
Gets new status after applying hysteresis.
| newValue | Latest raw value to update the filter |
|
private |
Threshold above which output becomes true.
|
private |
Latest state after applying hysteresis.
|
private |
Threshold below which output becomes false.