WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
frc::XRPServo Class Reference

XRPServo. More...

#include <frc/xrp/XRPServo.h>

Public Member Functions

 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.
 

Detailed Description

XRPServo.

A SimDevice based servo

Constructor & Destructor Documentation

◆ XRPServo()

frc::XRPServo::XRPServo ( int deviceNum)
explicit

Constructs an XRPServo.

Parameters
deviceNumthe servo channel

Member Function Documentation

◆ GetAngle()

units::radian_t frc::XRPServo::GetAngle ( ) const

Get the servo angle.

Returns
Current servo angle in radians

◆ GetPosition()

double frc::XRPServo::GetPosition ( ) const

Get the servo position.

Returns
Current servo position
Deprecated
Use GetAngle() instead

◆ SetAngle()

void frc::XRPServo::SetAngle ( units::radian_t angle)

Set the servo angle.

Parameters
angleDesired angle in radians

◆ SetPosition()

void frc::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: