2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
edge_detector.h
Go to the documentation of this file.
1
4
5#pragma once
6
7#include <string>
8
9namespace argos_lib {
10
12 public:
14
15 enum class edgeStatus { FALLING, RISING, ERROR, NONE };
16
17 explicit EdgeDetector(EdgeDetector::EdgeDetectSettings _settings, bool initialValue = false);
18
19 bool operator()(bool curVal);
20
21 edgeStatus Calculate(bool curVal);
22
23 std::string ToString(edgeStatus status);
24
25 private:
27
29
30 edgeStatus DetectFalling(bool currentValue);
31
32 edgeStatus DetectRising(bool currentValue);
33 };
34} // namespace argos_lib
Definition edge_detector.h:11
edgeStatus
Definition edge_detector.h:15
std::string ToString(edgeStatus status)
Definition edge_detector.cpp:53
bool m_previousValue
Definition edge_detector.h:28
edgeStatus DetectRising(bool currentValue)
Definition edge_detector.cpp:82
bool operator()(bool curVal)
Definition edge_detector.cpp:16
EdgeDetector::EdgeDetectSettings m_settings
Definition edge_detector.h:26
edgeStatus DetectFalling(bool currentValue)
Definition edge_detector.cpp:74
edgeStatus Calculate(bool curVal)
Definition edge_detector.cpp:32
EdgeDetectSettings
Definition edge_detector.h:13
Definition swap_controllers_command.h:12