Class XRPServo

java.lang.Object
edu.wpi.first.wpilibj.xrp.XRPServo

public class XRPServo extends Object
XRPServo.

A SimDevice based servo

  • Constructor Details

    • XRPServo

      public XRPServo(int deviceNum)
      Constructs an XRPServo.
      Parameters:
      deviceNum - the servo channel
  • Method Details

    • setAngle

      public void setAngle(double angleDegrees)
      Set the servo angle.
      Parameters:
      angleDegrees - Desired angle in degrees
    • getAngle

      public double getAngle()
      Get the servo angle.
      Returns:
      Current servo angle
    • setPosition

      public void setPosition(double position)
      Set the servo position.
      Parameters:
      position - Desired position (Between 0.0 and 1.0)
    • getPosition

      public double getPosition()
      Get the servo position.
      Returns:
      Current servo position