mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
[wpimath] Improve SimpleMotorFeedforward argument names and deprecation message (#7489)
Also roll back SimpleMotorFeedforward unit API until 2027.
This commit is contained in:
@@ -84,14 +84,15 @@ class SimpleMotorFeedforward {
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the feedforward from the gains and setpoint assuming discrete
|
||||
* control. Use this method when the setpoint does not change.
|
||||
* Calculates the feedforward from the gains and velocity setpoint assuming
|
||||
* discrete control. Use this method when the velocity setpoint does not
|
||||
* change.
|
||||
*
|
||||
* @param setpoint The velocity setpoint.
|
||||
* @param velocity The velocity setpoint.
|
||||
* @return The computed feedforward, in volts.
|
||||
*/
|
||||
constexpr units::volt_t Calculate(units::unit_t<Velocity> setpoint) const {
|
||||
return Calculate(setpoint, setpoint);
|
||||
constexpr units::volt_t Calculate(units::unit_t<Velocity> velocity) const {
|
||||
return Calculate(velocity, velocity);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user