TRC Library for FRC (2011) 2011
TRC Library Code Project

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.

Definition at line 38 of file TrcGyro.h.


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:
slotSpecifies the slot of the analog module.
channelSpecifies the analog channel.
periodSpecifies the sampling time for doing calculations. This period is used to differentiate angle into velocity and acceleration.

Definition at line 130 of file TrcGyro.h.

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:
channelSpecifies the analog channel.
periodSpecifies the sampling time for doing calculations. This period is used to differentiate angle into velocity and acceleration.

Definition at line 152 of file TrcGyro.h.

TrcGyro::~TrcGyro ( void  ) [inline]

Destructor: Destroy an instance of the TrcGyro object.

Definition at line 167 of file TrcGyro.h.


Member Function Documentation

float TrcGyro::GetAngle ( void  ) [inline]

This function gets the current angle in degrees.

Definition at line 184 of file TrcGyro.h.

float TrcGyro::GetAngularAcceleration ( void  ) [inline]

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

Definition at line 229 of file TrcGyro.h.

float TrcGyro::GetAngularVelocity ( void  ) [inline]

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

Definition at line 206 of file TrcGyro.h.

double TrcGyro::PIDGet ( void  ) [inline]

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

Definition at line 273 of file TrcGyro.h.

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

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

Definition at line 252 of file TrcGyro.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Defines