[wpilib] Make physics sim setState() functions public (#5779)

This commit is contained in:
Tyler Veness
2023-10-17 19:52:02 -07:00
committed by GitHub
parent 7501e4ac88
commit 3f3a169149
2 changed files with 6 additions and 6 deletions

View File

@@ -88,10 +88,10 @@ public class DCMotorSim extends LinearSystemSim<N2, N1, N2> {
/**
* Sets the state of the DC motor.
*
* @param position The new position
* @param velocity The new velocity
* @param angularPositionRad The new position in radians.
* @param angularVelocityRadPerSec The new velocity in radians per second.
*/
void setState(double angularPositionRad, double angularVelocityRadPerSec) {
public void setState(double angularPositionRad, double angularVelocityRadPerSec) {
setState(VecBuilder.fill(angularPositionRad, angularVelocityRadPerSec));
}

View File

@@ -177,10 +177,10 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N1> {
* Sets the arm's state. The new angle will be limited between the minimum and maximum allowed
* limits.
*
* @param angleRadians The new angle.
* @param velocityRadPerSec The new angular velocity.
* @param angleRadians The new angle in radians.
* @param velocityRadPerSec The new angular velocity in radians per second.
*/
void setState(double angleRadians, double velocityRadPerSec) {
public void setState(double angleRadians, double velocityRadPerSec) {
setState(
VecBuilder.fill(MathUtil.clamp(angleRadians, m_minAngle, m_maxAngle), velocityRadPerSec));
}