31                        double initialPosition = 0);
 
   78  bool m_enabled{
false};
 
   93  virtual void UseOutput(
double output, 
double setpoint) = 0;
 
 
A subsystem that uses a PIDController to control an output.
Definition PIDSubsystem.h:22
 
bool IsEnabled()
Returns whether the controller is enabled.
 
virtual void Enable()
Enables the PID control.
 
virtual void UseOutput(double output, double setpoint)=0
Uses the output from the PIDController.
 
frc::PIDController & GetController()
Returns the PIDController.
 
double GetSetpoint() const
Gets the setpoint for the subsystem.
 
PIDSubsystem(frc::PIDController controller, double initialPosition=0)
Creates a new PIDSubsystem.
 
virtual void Disable()
Disables the PID control.
 
void Periodic() override
This method is called periodically by the CommandScheduler.
 
virtual double GetMeasurement()=0
Returns the measurement of the process variable used by the PIDController.
 
void SetSetpoint(double setpoint)
Sets the setpoint for the subsystem.
 
frc::PIDController m_controller
PID controller.
Definition PIDSubsystem.h:75
 
A base for subsystems that handles registration in the constructor, and provides a more intuitive met...
Definition SubsystemBase.h:24
 
Implements a PID control loop.
Definition PIDController.h:29
 
Definition FunctionalCommand.h:13