mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Update ProfiledPIDController API (#1967)
This commit is contained in:
@@ -108,6 +108,13 @@ class ProfiledPIDController : public Sendable,
|
||||
*/
|
||||
units::second_t GetPeriod() const;
|
||||
|
||||
/**
|
||||
* Sets the goal for the ProfiledPIDController.
|
||||
*
|
||||
* @param goal The desired unprofiled setpoint.
|
||||
*/
|
||||
void SetGoal(TrapezoidProfile::State goal);
|
||||
|
||||
/**
|
||||
* Sets the goal for the ProfiledPIDController.
|
||||
*
|
||||
@@ -118,7 +125,7 @@ class ProfiledPIDController : public Sendable,
|
||||
/**
|
||||
* Gets the goal for the ProfiledPIDController.
|
||||
*/
|
||||
units::meter_t GetGoal() const;
|
||||
TrapezoidProfile::State GetGoal() const;
|
||||
|
||||
/**
|
||||
* Returns true if the error is within the tolerance of the error.
|
||||
@@ -139,7 +146,7 @@ class ProfiledPIDController : public Sendable,
|
||||
*
|
||||
* @return The current setpoint.
|
||||
*/
|
||||
double GetSetpoint() const;
|
||||
TrapezoidProfile::State GetSetpoint() const;
|
||||
|
||||
/**
|
||||
* Returns true if the error is within the tolerance of the error.
|
||||
@@ -208,7 +215,7 @@ class ProfiledPIDController : public Sendable,
|
||||
*
|
||||
* @param measurement The current measurement of the process variable.
|
||||
*/
|
||||
double Calculate(double measurement);
|
||||
double Calculate(units::meter_t measurement);
|
||||
|
||||
/**
|
||||
* Returns the next output of the PID controller.
|
||||
@@ -216,7 +223,15 @@ class ProfiledPIDController : public Sendable,
|
||||
* @param measurement The current measurement of the process variable.
|
||||
* @param goal The new goal of the controller.
|
||||
*/
|
||||
double Calculate(double measurement, units::meter_t goal);
|
||||
double Calculate(units::meter_t measurement, TrapezoidProfile::State goal);
|
||||
|
||||
/**
|
||||
* Returns the next output of the PID controller.
|
||||
*
|
||||
* @param measurement The current measurement of the process variable.
|
||||
* @param goal The new goal of the controller.
|
||||
*/
|
||||
double Calculate(units::meter_t measurement, units::meter_t goal);
|
||||
|
||||
/**
|
||||
* Returns the next output of the PID controller.
|
||||
@@ -225,7 +240,7 @@ class ProfiledPIDController : public Sendable,
|
||||
* @param goal The new goal of the controller.
|
||||
* @param constraints Velocity and acceleration constraints for goal.
|
||||
*/
|
||||
double Calculate(double measurement, units::meter_t goal,
|
||||
double Calculate(units::meter_t measurement, units::meter_t goal,
|
||||
frc::TrapezoidProfile::Constraints constraints);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user