mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilibc] DCMotorSim: Add setAngle/setAngularVelocity (parity with Java) (#7613)
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user