7#include <frc/TimedRobot.h>
9#include "valkyrie/sensors/BaseSensor.h"
63 std::function<
void()> edge;
64 std::function<
void()> fallingEdge;
65 std::function<
void()> risingEdge;
Abstract class that all Valor sensors should implement.
Definition BaseSensor.h:27
Sensor for debouncing and detecting rising/falling edges of boolean inputs.
Definition DebounceSensor.h:22
void setFallingEdgeCallback(std::function< void()> _lambda)
Set a callback function for detecting a falling edge.
DebounceSensor(frc::TimedRobot &robot)
Construct a new DebounceSensor object.
void setRisingEdgeCallback(std::function< void()> _lambda)
Set a callback function for detecting a rising edge.
void setEdgeCallback(std::function< void()> _lambda)
Set a callback function for detecting any edge (rising or falling).
void calculate() override
Perform debounce-specific calculations.
T ReadLog(std::string_view field, const T &defaultValue={})
Read a value from NetworkTables for the given field.
Definition Loggable.h:343