39 std::function<
double()> measurementSource,
40 std::function<
double()> setpointSource,
41 std::function<
void(
double)> useOutput,
55 std::function<
double()> measurementSource,
double setpoint,
56 std::function<
void(
double)> useOutput,
67 void End(
bool interrupted)
override;
CRTP implementation to allow polymorphic decorator functions in Command.
Definition: CommandHelper.h:27
A command that controls an output with a PIDController.
Definition: PIDCommand.h:26
PIDCommand(frc::PIDController controller, std::function< double()> measurementSource, double setpoint, std::function< void(double)> useOutput, Requirements requirements={})
Creates a new PIDCommand, which controls the given output with a PIDController with a constant setpoi...
PIDCommand(PIDCommand &&other)=default
std::function< double()> m_measurement
Measurement getter.
Definition: PIDCommand.h:81
void Initialize() override
std::function< void(double)> m_useOutput
PID controller output consumer.
Definition: PIDCommand.h:87
void End(bool interrupted) override
frc::PIDController m_controller
PID controller.
Definition: PIDCommand.h:78
frc::PIDController & GetController()
Returns the PIDController used by the command.
PIDCommand(const PIDCommand &other)=default
std::function< double()> m_setpoint
Setpoint getter.
Definition: PIDCommand.h:84
PIDCommand(frc::PIDController controller, std::function< double()> measurementSource, std::function< double()> setpointSource, std::function< void(double)> useOutput, Requirements requirements={})
Creates a new PIDCommand, which controls the given output with a PIDController.
Represents requirements for a command, which is a set of (pointers to) subsystems.
Definition: Requirements.h:20
Implements a PID control loop.
Definition: PIDController.h:23
Definition: TrapezoidProfileSubsystem.h:12