mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilib] Make physics sim setState() functions public (#5779)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user