41 double tolerance = std::numeric_limits<double>::infinity());
117 double m_setpoint = 0;
118 double m_measurement = 0;
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
Implements a bang-bang controller, which outputs either 0 or 1 depending on whether the measurement i...
Definition: BangBangController.h:30
double GetMeasurement() const
Returns the current measurement of the process variable.
double GetError() const
Returns the current error.
void SetSetpoint(double setpoint)
Sets the setpoint for the bang-bang controller.
void InitSendable(wpi::SendableBuilder &builder) override
Initializes this Sendable object.
double Calculate(double measurement)
Returns the calculated control output.
void SetTolerance(double tolerance)
Sets the error within which AtSetpoint will return true.
BangBangController(double tolerance=std::numeric_limits< double >::infinity())
Creates a new bang-bang controller.
double Calculate(double measurement, double setpoint)
Returns the calculated control output.
double GetSetpoint() const
Returns the current setpoint of the bang-bang controller.
bool AtSetpoint() const
Returns true if the error is within the tolerance of the setpoint.
double GetTolerance() const
Returns the current tolerance of the controller.
Definition: SendableBuilder.h:18
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:19
Interface for Sendable objects.
Definition: Sendable.h:16
Definition: AprilTagPoseEstimator.h:15