LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
LRTEncoder Class Reference

LRTEncoder patches bugs in WPILib's Encoder class. More...

#include <LRTEncoder.h>

Inheritance diagram for LRTEncoder:
Collaboration diagram for LRTEncoder:

Public Member Functions

 LRTEncoder (const char *name, uint32_t sourceA, uint32_t sourceB, double trim=1.0)
 Constructs an LRTEncoder.
 
 ~LRTEncoder ()
 Destroys this LRTEncoder.
 
void Start ()
 Starts the LRTEncoder.
 
int32_t Get ()
 Gets the current count of the encoder.
 
double GetRate ()
 Gets the current rate of the encoder.
 
void Log ()
 Logs data to the Logger.
 

Additional Inherited Members

- Protected Member Functions inherited from Loggable
template<typename T >
void LogToFile (T *field, std::string name)
 Saves a variable to the Logger for logging.
 
template<typename T >
void LogToFile (T *field, int count, std::string name)
 Saves a dynamically allocated array to the Logger for logging.
 
template<typename T >
void LogToFile (T value, std::string name)
 Saves a value to the Logger for logging.
 

Detailed Description

LRTEncoder patches bugs in WPILib's Encoder class.

Constructor & Destructor Documentation

LRTEncoder::LRTEncoder ( const char *  name,
uint32_t  sourceA,
uint32_t  sourceB,
double  trim = 1.0 
)

Constructs an LRTEncoder.

Parameters
namename of encoder
sourceAchannel A
sourceBchannel B
trimscaling factor for the encoder

Member Function Documentation

int32_t LRTEncoder::Get ( )

Gets the current count of the encoder.

Returns
encoder tick count

Here is the caller graph for this function:

double LRTEncoder::GetRate ( )

Gets the current rate of the encoder.

Returns
encoder tick rate

Here is the caller graph for this function:


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