[wpimath] Fix SimpleMotorFeedforward no-accel overload returning negative voltage outputs (#7999)

SimpleMotorFeedforward::calculate(velocity) was not updated to account for the removal of calculate(velocity, acceleration), so it would pass currentVelocity = velocity and nextVelocity = 0, resulting in negative outputs in many scenarios.
This commit is contained in:
DeltaDizzy
2025-06-01 18:46:54 -05:00
committed by GitHub
parent e12d78a70a
commit 1955dcddb3

View File

@@ -157,7 +157,7 @@ public class SimpleMotorFeedforward implements ProtobufSerializable, StructSeria
* @return The computed feedforward.
*/
public double calculate(double velocity) {
return calculate(velocity, 0);
return calculate(velocity, velocity);
}
/**