[wpimath] Improve SimpleMotorFeedforward argument names and deprecation message (#7489)

Also roll back SimpleMotorFeedforward unit API until 2027.
This commit is contained in:
Tyler Veness
2024-12-06 22:32:40 -08:00
committed by GitHub
parent 1921d019b7
commit 882233bede
22 changed files with 91 additions and 233 deletions

View File

@@ -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);
}
/**