Package edu.wpi.first.wpilibj.xrp
Class XRPServo
java.lang.Object
edu.wpi.first.wpilibj.xrp.XRPServo
XRPServo.
A SimDevice based servo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getAngle()
Get the servo angle.double
Get the servo position.void
setAngle
(double angleDegrees) Set the servo angle.void
setPosition
(double position) Set the servo position.
-
Constructor Details
-
XRPServo
Constructs an XRPServo.- Parameters:
deviceNum
- the servo channel
-
-
Method Details
-
setAngle
Set the servo angle.- Parameters:
angleDegrees
- Desired angle in degrees
-
getAngle
Get the servo angle.- Returns:
- Current servo angle
-
setPosition
Set the servo position.- Parameters:
position
- Desired position (Between 0.0 and 1.0)
-
getPosition
Get the servo position.- Returns:
- Current servo position
-