Now you can download a copy of these docs so you can use them offline! Download now

SendableGyro Class Reference

#include <SendableGyro.h>

Inheritance diagram for SendableGyro:
Collaboration diagram for SendableGyro:

List of all members.

Public Member Functions

 SendableGyro (UINT8 moduleNumber, UINT32 channel)
 SendableGyro (UINT32 channel)
 SendableGyro (AnalogChannel *channel)
virtual float GetAngle ()
virtual void Reset ()
void SetUpdatePeriod (double period)
double GetUpdatePeriod ()
void ResetToAngle (double angle)
virtual std::string GetType ()
virtual NetworkTableGetTable ()

Detailed Description

The SendableGyro class behaves exactly the same as a Gyro except that it also implements SmartDashboardData so that it can be sent over to the SmartDashboard.

Definition at line 21 of file SendableGyro.h.


Constructor & Destructor Documentation

SendableGyro::SendableGyro ( UINT8  moduleNumber,
UINT32  channel 
)

Gyro constructor given a moduleNumber and a channel.

Parameters:
moduleNumber The analog module the gyro is connected to.
channel The analog channel the gyro is connected to.

Definition at line 24 of file SendableGyro.cpp.

SendableGyro::SendableGyro ( UINT32  channel  ) 

Gyro constructor with only a channel.

Use the default analog module slot.

Parameters:
channel The analog channel the gyro is connected to.

Definition at line 41 of file SendableGyro.cpp.

SendableGyro::SendableGyro ( AnalogChannel channel  ) 

Gyro constructor with a precreated analog channel object. Use this constructor when the analog channel needs to be shared. There is no reference counting when an AnalogChannel is passed to the gyro.

Parameters:
channel The AnalogChannel object that the gyro is connected to.

Definition at line 57 of file SendableGyro.cpp.


Member Function Documentation

double SendableGyro::GetUpdatePeriod (  ) 

Returns the period (in seconds) between updates to the SmartDashboard. This value is independent of whether or not this SendableGyro is connected to the SmartDashboard. The default value is 0.2 seconds.

Returns:
the period (in seconds)

Definition at line 114 of file SendableGyro.cpp.

void SendableGyro::ResetToAngle ( double  angle  ) 

Reset the gyro. Resets the gyro to the given heading. This can be used if there is significant drift in the gyro and it needs to be recalibrated after it has been running.

Parameters:
angle the angle the gyro should believe it is pointing

Definition at line 125 of file SendableGyro.cpp.

void SendableGyro::SetUpdatePeriod ( double  period  ) 

Sets the time (in seconds) between updates to the SmartDashboard. The default is 0.2 seconds.

Parameters:
period the new time between updates

Definition at line 100 of file SendableGyro.cpp.


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

Generated on Thu Jan 12 2012 22:35:36 for WPILibC++ by doxygen 1.7.1