XRPServo.
More...
#include <wpi/xrp/XRPServo.hpp>
|
| | XRPServo (int deviceNum) |
| | Constructs an XRPServo.
|
| void | SetAngle (wpi::units::radian_t angle) |
| | Set the servo angle.
|
| wpi::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()
| wpi::xrp::XRPServo::XRPServo |
( |
int | deviceNum | ) |
|
|
explicit |
Constructs an XRPServo.
- Parameters
-
| deviceNum | the servo channel |
◆ GetAngle()
| wpi::units::radian_t wpi::xrp::XRPServo::GetAngle |
( |
| ) |
const |
Get the servo angle.
- Returns
- Current servo angle in radians
◆ GetPosition()
| double wpi::xrp::XRPServo::GetPosition |
( |
| ) |
const |
◆ SetAngle()
| void wpi::xrp::XRPServo::SetAngle |
( |
wpi::units::radian_t | angle | ) |
|
Set the servo angle.
- Parameters
-
| angle | Desired angle in radians |
◆ SetPosition()
| void wpi::xrp::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: