[wpilibc] DCMotorSim: Add setAngle/setAngularVelocity (parity with Java) (#7613)

This commit is contained in:
Dustin Spicuzza
2024-12-31 17:30:16 -05:00
committed by GitHub
parent 4edf52d3b6
commit 86137c49f5
2 changed files with 23 additions and 0 deletions

View File

@@ -45,6 +45,20 @@ class DCMotorSim : public LinearSystemSim<2, 1, 2> {
void SetState(units::radian_t angularPosition,
units::radians_per_second_t angularVelocity);
/**
* Sets the DC motor's angular position.
*
* @param angularPosition The new position in radians.
*/
void SetAngle(units::radian_t angularPosition);
/**
* Sets the DC motor's angular velocity.
*
* @param angularVelocity The new velocity in radians per second.
*/
void SetAngularVelocity(units::radians_per_second_t angularVelocity);
/**
* Returns the DC motor position.
*