2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
argos_lib::EdgeDetector Class Reference

#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
 

Member Enumeration Documentation

◆ EdgeDetectSettings

Enumerator
DETECT_BOTH 
DETECT_FALLING 
DETECT_RISING 

◆ edgeStatus

Enumerator
FALLING 
RISING 
ERROR 
NONE 

Constructor & Destructor Documentation

◆ EdgeDetector()

EdgeDetector::EdgeDetector ( EdgeDetector::EdgeDetectSettings  _settings,
bool  initialValue = false 
)
explicit

Member Function Documentation

◆ Calculate()

EdgeDetector::edgeStatus EdgeDetector::Calculate ( bool  curVal)

◆ DetectFalling()

EdgeDetector::edgeStatus EdgeDetector::DetectFalling ( bool  currentValue)
private

◆ DetectRising()

EdgeDetector::edgeStatus EdgeDetector::DetectRising ( bool  currentValue)
private

◆ operator()()

bool EdgeDetector::operator() ( bool  curVal)

◆ ToString()

std::string EdgeDetector::ToString ( edgeStatus  status)

Member Data Documentation

◆ m_previousValue

bool argos_lib::EdgeDetector::m_previousValue
private

◆ m_settings

EdgeDetector::EdgeDetectSettings argos_lib::EdgeDetector::m_settings
private

The documentation for this class was generated from the following files: