mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[wpimath] Clean up arm and elevator feedforward APIs (#7595)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user