mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpimath] ProfiledPIDController: Add getConstraints (#5399)
This commit is contained in:
@@ -199,6 +199,15 @@ public class ProfiledPIDController implements Sendable {
|
||||
m_constraints = constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the velocity and acceleration constraints for this controller.
|
||||
*
|
||||
* @return Velocity and acceleration constraints.
|
||||
*/
|
||||
public TrapezoidProfile.Constraints getConstraints() {
|
||||
return m_constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current setpoint of the ProfiledPIDController.
|
||||
*
|
||||
|
||||
@@ -185,6 +185,12 @@ class ProfiledPIDController
|
||||
*/
|
||||
void SetConstraints(Constraints constraints) { m_constraints = constraints; }
|
||||
|
||||
/**
|
||||
* Get the velocity and acceleration constraints for this controller.
|
||||
* @return Velocity and acceleration constraints.
|
||||
*/
|
||||
Constraints GetConstraints() { return m_constraints; }
|
||||
|
||||
/**
|
||||
* Returns the current setpoint of the ProfiledPIDController.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user