[wpimath] Clean up arm and elevator feedforward APIs (#7595)

This commit is contained in:
Tyler Veness
2024-12-27 06:12:14 -08:00
committed by GitHub
parent 2a757eaeb5
commit df244cd198
5 changed files with 12 additions and 66 deletions

View File

@@ -68,8 +68,7 @@ class ArmFeedforwardTest {
*/
private void calculateAndSimulate(
double currentAngle, double currentVelocity, double nextVelocity, double dt) {
final double input =
m_armFF.calculateWithVelocities(currentAngle, currentVelocity, nextVelocity);
final double input = m_armFF.calculate(currentAngle, currentVelocity, nextVelocity);
assertEquals(nextVelocity, simulate(currentAngle, currentVelocity, input, dt).get(1, 0), 1e-12);
}

View File

@@ -36,7 +36,7 @@ class ElevatorFeedforwardTest {
var nextR = VecBuilder.fill(3.0);
assertEquals(
plantInversion.calculate(r, nextR).get(0, 0) + ks + kg,
m_elevatorFF.calculateWithVelocities(2.0, 3.0),
m_elevatorFF.calculate(2.0, 3.0),
0.002);
}