2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
|
#include <edge_detector.h>
Public Types | |
enum class | EdgeDetectSettings { DETECT_BOTH , DETECT_FALLING , DETECT_RISING } |
enum class | edgeStatus { FALLING , RISING , ERROR , NONE } |
Public Member Functions | |
EdgeDetector (EdgeDetector::EdgeDetectSettings _settings, bool initialValue=false) | |
bool | operator() (bool curVal) |
edgeStatus | Calculate (bool curVal) |
std::string | ToString (edgeStatus status) |
Private Member Functions | |
edgeStatus | DetectFalling (bool currentValue) |
edgeStatus | DetectRising (bool currentValue) |
Private Attributes | |
EdgeDetector::EdgeDetectSettings | m_settings |
bool | m_previousValue |
|
strong |
|
strong |
|
explicit |
EdgeDetector::edgeStatus EdgeDetector::Calculate | ( | bool | curVal | ) |
|
private |
|
private |
bool EdgeDetector::operator() | ( | bool | curVal | ) |
std::string EdgeDetector::ToString | ( | edgeStatus | status | ) |
|
private |
|
private |