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

#include <GearTooth.h>

Inheritance diagram for GearTooth:
Collaboration diagram for GearTooth:

List of all members.

Public Member Functions

 GearTooth (UINT32 channel, bool directionSensitive=false)
 GearTooth (UINT8 moduleNumber, UINT32 channel, bool directionSensitive=false)
 GearTooth (DigitalSource *source, bool directionSensitive=false)
 GearTooth (DigitalSource &source, bool directionSensitive=false)
virtual ~GearTooth ()
void EnableDirectionSensing (bool directionSensitive)

Static Public Attributes

static const double kGearToothThreshold = 55e-6
 55 uSec for threshold

Detailed Description

Alias for counter class. Implement the gear tooth sensor supplied by FIRST. Currently there is no reverse sensing on the gear tooth sensor, but in future versions we might implement the necessary timing in the FPGA to sense direction.

Definition at line 18 of file GearTooth.h.


Constructor & Destructor Documentation

GearTooth::GearTooth ( UINT32  channel,
bool  directionSensitive = false 
)

Construct a GearTooth sensor given a channel.

The default module is assumed.

Parameters:
channel The GPIO channel on the digital module that the sensor is connected to.
directionSensitive Enable the pulse length decoding in hardware to specify count direction.

Definition at line 30 of file GearTooth.cpp.

GearTooth::GearTooth ( UINT8  moduleNumber,
UINT32  channel,
bool  directionSensitive = false 
)

Construct a GearTooth sensor given a channel and module.

Parameters:
moduleNumber The digital module (1 or 2).
channel The GPIO channel on the digital module that the sensor is connected to.
directionSensitive Enable the pulse length decoding in hardware to specify count direction.

Definition at line 43 of file GearTooth.cpp.

GearTooth::GearTooth ( DigitalSource source,
bool  directionSensitive = false 
)

Construct a GearTooth sensor given a digital input. This should be used when sharing digial inputs.

Parameters:
source An object that fully descibes the input that the sensor is connected to.
directionSensitive Enable the pulse length decoding in hardware to specify count direction.

Definition at line 56 of file GearTooth.cpp.

GearTooth::~GearTooth (  )  [virtual]

Free the resources associated with a gear tooth sensor.

Definition at line 70 of file GearTooth.cpp.


Member Function Documentation

void GearTooth::EnableDirectionSensing ( bool  directionSensitive  ) 

Common code called by the constructors.

Definition at line 14 of file GearTooth.cpp.


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

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