[wpilib] Fix acceleration getter for DCMotorSim (#7449)

This commit is contained in:
Nicholas Armstrong
2024-11-30 01:15:00 -05:00
committed by GitHub
parent 0941251375
commit b91864a5ec
2 changed files with 2 additions and 2 deletions

View File

@@ -184,7 +184,7 @@ public class DCMotorSim extends LinearSystemSim<N2, N1, N2> {
*/
public double getAngularAccelerationRadPerSecSq() {
var acceleration = (m_plant.getA().times(m_x)).plus(m_plant.getB().times(m_u));
return acceleration.get(0, 0);
return acceleration.get(1, 0);
}
/**