TrcGyro Class Reference

#include <TrcGyro.h>

List of all members.

Public Member Functions

 TrcGyro (__in UINT32 slot, __in UINT32 channel, __in float period=0.05)
 TrcGyro (__in UINT32 channel, __in float period=0.05)
 ~TrcGyro (void)
float GetAngle (void)
float GetAngularVelocity (void)
float GetAngularAcceleration (void)
void SetPIDMode (__in UINT32 mode)
double PIDGet (void)

Detailed Description

This class defines and implements the TrcGyro object. This object inherits the Gyro object from the WPI library. It added the support of providing angular velocity as well as angular acceleration information which is missing from the Gyro class in the WPI library.


Constructor & Destructor Documentation

TrcGyro::TrcGyro ( __in UINT32  slot,
__in UINT32  channel,
__in float  period = 0.05 
) [inline]

Constructor: Create an instance of the TrcGyro object. It initializes the object and starts the periodic timer.

Parameters:
slot Specifies the slot of the analog module.
channel Specifies the analog channel.
period Specifies the sampling time for doing calculations. This period is used to differentiate angle into velocity and acceleration.
TrcGyro::TrcGyro ( __in UINT32  channel,
__in float  period = 0.05 
) [inline]

Constructor: Create an instance of the TrcGyro object. It initializes the object and starts the periodic timer.

Parameters:
channel Specifies the analog channel.
period Specifies the sampling time for doing calculations. This period is used to differentiate angle into velocity and acceleration.
TrcGyro::~TrcGyro ( void   )  [inline]

Destructor: Destroy an instance of the TrcGyro object.


Member Function Documentation

float TrcGyro::GetAngle ( void   )  [inline]

This function gets the current angle in degrees.

float TrcGyro::GetAngularAcceleration ( void   )  [inline]

This function gets the current angular acceleration in degrees per second square.

float TrcGyro::GetAngularVelocity ( void   )  [inline]

This function gets the current angular velocity in degrees per second.

double TrcGyro::PIDGet ( void   )  [inline]

This function is called by the PID controller to get the sensor data.

void TrcGyro::SetPIDMode ( __in UINT32  mode  )  [inline]

This function sets the PID mode so that PIDGet will return the desired value.


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

Generated by  doxygen 1.6.2