WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::xrp::XRPServo Class Reference

XRPServo. More...

#include <wpi/xrp/XRPServo.hpp>

Public Member Functions

 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.

Detailed Description

XRPServo.

A SimDevice based servo

Constructor & Destructor Documentation

◆ XRPServo()

wpi::xrp::XRPServo::XRPServo ( int deviceNum)
explicit

Constructs an XRPServo.

Parameters
deviceNumthe servo channel

Member Function Documentation

◆ 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

Get the servo position.

Returns
Current servo position
Deprecated
Use GetAngle() instead

◆ SetAngle()

void wpi::xrp::XRPServo::SetAngle ( wpi::units::radian_t angle)

Set the servo angle.

Parameters
angleDesired angle in radians

◆ SetPosition()

void wpi::xrp::XRPServo::SetPosition ( double position)

Set the servo position.

Parameters
positionDesired position (Between 0.0 and 1.0)
Deprecated
Use SetAngle() instead

The documentation for this class was generated from the following file: