21template <
class Distance>
112 virtual void UseOutput(
double output, State setpoint) = 0;
A subsystem that uses a ProfiledPIDController to control an output.
Definition: ProfiledPIDSubsystem.h:22
virtual Distance_t GetMeasurement()=0
Returns the measurement of the process variable used by the ProfiledPIDController.
ProfiledPIDSubsystem(frc::ProfiledPIDController< Distance > controller, Distance_t initialPosition=Distance_t{0})
Creates a new ProfiledPIDSubsystem.
Definition: ProfiledPIDSubsystem.h:36
bool IsEnabled()
Returns whether the controller is enabled.
Definition: ProfiledPIDSubsystem.h:84
frc::ProfiledPIDController< Distance > & GetController()
Returns the ProfiledPIDController.
Definition: ProfiledPIDSubsystem.h:91
void Periodic() override
This method is called periodically by the CommandScheduler.
Definition: ProfiledPIDSubsystem.h:42
virtual void UseOutput(double output, State setpoint)=0
Uses the output from the ProfiledPIDController.
bool m_enabled
Definition: ProfiledPIDSubsystem.h:95
void SetGoal(Distance_t goal)
Sets the goal state for the subsystem.
Definition: ProfiledPIDSubsystem.h:61
frc::ProfiledPIDController< Distance > m_controller
Definition: ProfiledPIDSubsystem.h:94
virtual void Disable()
Disables the PID control.
Definition: ProfiledPIDSubsystem.h:74
virtual void Enable()
Enables the PID control.
Definition: ProfiledPIDSubsystem.h:66
void SetGoal(State goal)
Sets the goal state for the subsystem.
Definition: ProfiledPIDSubsystem.h:54
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 whose setpoint is constrained by a trapezoid profile.
Definition: ProfiledPIDController.h:35
Definition: TrapezoidProfile.h:67
typename units::detail::compound_impl< U, Us... >::type compound_unit
Represents a unit type made up from other units.
Definition: base.h:1445
Definition: ProfiledPIDCommand.h:18