XRPServo.
More...
#include <frc/xrp/XRPServo.h>
|
| XRPServo (int deviceNum) |
| Constructs an XRPServo.
|
|
void | SetAngle (units::radian_t angle) |
| Set the servo angle.
|
|
units::radian_t | GetAngle () const |
| Get the servo angle.
|
|
void | SetPosition (double position) |
| Set the servo position.
|
|
double | GetPosition () const |
| Get the servo position.
|
|
XRPServo.
A SimDevice based servo
◆ XRPServo()
frc::XRPServo::XRPServo |
( |
int | deviceNum | ) |
|
|
explicit |
Constructs an XRPServo.
- Parameters
-
deviceNum | the servo channel |
◆ GetAngle()
units::radian_t frc::XRPServo::GetAngle |
( |
| ) |
const |
Get the servo angle.
- Returns
- Current servo angle in radians
◆ GetPosition()
double frc::XRPServo::GetPosition |
( |
| ) |
const |
◆ SetAngle()
void frc::XRPServo::SetAngle |
( |
units::radian_t | angle | ) |
|
Set the servo angle.
- Parameters
-
angle | Desired angle in radians |
◆ SetPosition()
void frc::XRPServo::SetPosition |
( |
double | position | ) |
|
Set the servo position.
- Parameters
-
position | Desired position (Between 0.0 and 1.0) |
- Deprecated
- Use SetAngle() instead
The documentation for this class was generated from the following file: